Surah Al-Hijr 15:4
وَمَآ أَهْلَكْنَا مِن قَرْيَةٍ إِلَّا وَلَهَا كِتَابٌ مَّعْلُومٌ
And We did not destroy any city but that for it was a known decree.
Translation: Saheeh International
Tafsir
And We did not destroy any town min qaryatin min is extra meaning its inhabitants but that it had a known decree a pre-determined term after which it would be destroyed.
Excerpt from Tafsir al-Jalalayn, commentary on 15:4, via Quran.com. The reader has the full commentary and 9 more tafsirs.