There is not a population but We shall destroy it before the Day of Judgment or punish it with a dreadful Penalty: that is written in the (eternal) Record.
The Quran frequently mentions the destruction of “towns” for the
wrongdoing of their inhabitants (e.g., 7:4, 59–101; 17:16; 21:11; 22:45), and this
destruction usually means the utter uprooting and annihilation of their people (Ṭ,
Z). In this verse, however, destruction is the fate that awaits all towns before the
Day of Resurrection. Some commentators suggest that although all towns will
eventually be destroyed, righteous towns will be “destroyed” through ordinary
death, whereas severe punishment, entailing terrifying modes of destruction, is
the fate of those that are wicked (Q, Ṭs, Z). That this fate is inscribed in the
Book—likely a reference to the Preserved Tablet (see 85:22c; Ṭ, Ṭs)—means
that the appointed time of destruction for all towns has already been decreed (cf.
7:34; 15:4; 18:59).
Nasr, Hossein (2015). Study Quran. http://www.islamicweblibrary.com/wp-content/uploads/2020/04/TheStudyQuran.pdf