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:54:4

And there has already come to them of information that in which there is deterrence -  

And verily there has come to them such tidings, stories about the destruction of communities which denied their messengers, as contain a deterrent, to them (muzdajar is a verbal noun, or a noun of place; the dāl ˹of muzdajar˺ replaces the tā’ of ˹the 8th form˺ ifta‘ala; one may say, izdajartuhu or zajartuhu, to mean ‘I forbade him sternly’; mā, ‘such as’, either indicates a relative clause, or it is qualified by an adjective);
القرآن:٥٤:٤

وَلَقَدْ جَاءَهُمْ مِنَ الْأَنْبَاءِ مَا فِيهِ مُزْدَجَرٌ  

{ولقد جاءهم من الأنباء} أخبار إهلاك الأمم المكذبة رسلهم {ما فيه مزدجر} لهم اسم مكان والدال بدل من تاء الافتعال وازدجرته وزجرته: نهيته بغلظة وما موصولة أو موصوفة.