Sure Al-Hijr

15:4

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

Und wir haben keine Stadt vernichtet, ohne daß sie eine festgelegte Frist gehabt hätte.

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.