Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:26:208

And We did not destroy any city except that it had warners  

And We have not destroyed any town but it had warners, messengers to warn its inhabitants;
القرآن:٢٦:٢٠٨

وَمَا أَهْلَكْنَا مِنْ قَرْيَةٍ إِلَّا لَهَا مُنْذِرُونَ  

{وما أهلكنا من قرية إلا لها منذرون} رسل تنذر أهلها.

See similar narrations below:

Collected by Qurʾān
quran:15:4

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

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.
القرآن:١٥:٤

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

{وما أهلكنا من} زائدة {قرية} أريد أهلها {إلا ولها كتاب} أجل {معلوم} محدود لإهلاكها.