And We conveyed to the Children of Israel in the Scripture that, “You will surely cause corruption on the earth twice, and you will surely reach [a degree of] great haughtiness.
So when the [time of] promise came for the first of them, We sent against you servants of Ours – those of great military might, and they probed [even] into the homes, and it was a promise fulfilled.
Then We gave back to you a return victory over them. And We reinforced you with wealth and sons and made you more numerous in manpower
Tafsir al-Jalalayn
And We said: ‘If you are virtuous, through [acts of] obedience, you are being virtuous to your own souls, since the reward thereof is for them [your souls]; and if you do evil, by way of [working] corruption, it is for them’, your evildoing. So when the time, the occasion, for the other [prophecy] comes, We will raise them forth, that they might ravage you, make you grieve through [their] slaying and taking captive [of you], a grief that will be manifest on your faces, and that they might enter the Temple, the Holy House [of Jerusalem], and destroy it, just as they entered it, and destroyed it, the first time, and that they might destroy, lay waste, all that they conquered, [all that] they gained ascendancy over, utterly, with an utter wasting. They indeed wrought corruption a second time when they slew [the prophet] John. Thus Nebuchadnezzar was roused against them, and so he slew thousands of them and took their children captive and destroyed the Holy House [of Jerusalem].
Allah knows best