Surah Al-Hijr

15:4

وَمَآ أَهْلَكْنَا مِن قَرْيَةٍ إِلَّا وَلَهَا كِتَابٌۭ مَّعْلُومٌۭ

And We did not destroy any city but that for it was a known decree.

Tafsir 15:4

For each oppressive town that became destroyed, Allah already knew of its fixed time. The destruction will neither come before or after its time.