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:36:31

Have they not considered how many generations We destroyed before them - that they to them will not return?  

Have they — that is, those inhabitants of Mecca who said to the Prophet, ‘You have not been sent ˹by God˺!’ ˹Q. 13:43˺ — not seen, ˹not˺ come to know (the interrogative is meant ˹rhetorically˺ as an affirmative) how many (kam here is predicative ˹as opposed to interrogative˺, in other words ˹it is to be understood as˺ kathīran, ‘many’; it is operated by the statement that comes next ˹below˺ and it comments on the operative clause for the statement that preceded it); the meaning then is as follows: indeed, many, generations, communities, We have destroyed before them, ˹how˺ that they, the ones destroyed, never return?, to those deniers ˹who are now alive˺? So will they not learn from their example? (from annahum, ‘˹how˺ that they’, to the end ˹of the verse˺ is a substitution for the preceding clause ˹kam ahlaknā qablahum mina’l-qurūni˺, bearing in mind the aforementioned general meaning).
القرآن:٣٦:٣١

أَلَمْ يَرَوْا كَمْ أَهْلَكْنَا قَبْلَهُمْ مِنَ الْقُرُونِ أَنَّهُمْ إِلَيْهِمْ لَا يَرْجِعُونَ  

(ألم يروا) أي أهل مكة القائلون للنبي "لست مرسلا" والاستفهام للتقرير أي علموا (كم) خبرية بمعنى كثيرا معمولة لها بعدها معلقة لما قبلها عن العمل، والمعنى إنا (أهلكنا قبلهم) كثيرا (من القرون) الأمم (أنهم) أي المهلكين (إليهم) أي المكذبين (لا يرجعون) أفلا يعتبرون بهم، وأنه الخ بدل مما قبله برعاية المعنى المذكور.

See similar narrations below:

Collected by Qurʾān
quran:19:74

And how many a generation have We destroyed before them who were better in possessions and ˹outward˺ appearance?  

And how many — in other words, many — a generation, that is, a community from among the communities of the past, have We destroyed before them, who were superior in ˹their possession of˺ gear, in wealth and chattel, and in appearance, ˹superior˺ as a sight (ri’yan derives from ˹the infinitive˺ al-ru’ya). Thus in the same way that We destroyed those ˹ones˺ because of their disbelief, We will destroy these ˹ones also˺.
القرآن:١٩:٧٤

وَكَمْ أَهْلَكْنَا قَبْلَهُمْ مِنْ قَرْنٍ هُمْ أَحْسَنُ أَثَاثًا وَرِئْيًا  

{وكم} أي كثيرا {أهلكنا قبلهم من قرن} أي أمة من الأمم الماضية {هم أحسن أثاثا} مالاً ومتاعا {ورئيا} منظرا من الرؤية فكما أهلكناهم لكفرهم هلك هؤلاء.