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:7:95

Then We exchanged in place of the bad ˹condition˺, good, until they increased ˹and prospered˺ and said, "Our fathers ˹also˺ were touched with hardship and ease." So We seized them suddenly while they did not perceive.  

Then We gave them in place of evil, the chastisement, good, wealth and health, until they multiplied, and said, out of ingratitude towards this grace: ‘Hardship and happiness befell our fathers before’, just as it has befallen us, and this is nothing but the habit of time, and not the consequence of God, so remain firm in what you follow. God, exalted be He, says: So We seized them, with the chastisement, suddenly, while they perceived not, beforehand the time of its coming.
القرآن:٧:٩٥

ثُمَّ بَدَّلْنَا مَكَانَ السَّيِّئَةِ الْحَسَنَةَ حَتَّىٰ عَفَوْا وَقَالُوا قَدْ مَسَّ آبَاءَنَا الضَّرَّاءُ وَالسَّرَّاءُ فَأَخَذْنَاهُمْ بَغْتَةً وَهُمْ لَا يَشْعُرُونَ  

{ثم بدَّلنا} أعطيناهم {مكان السيئة} العذاب {الحسنة} الغنى والصحة {حتى عفوا} كثروا {وقالوا} كفرا للنعمة {قد مس آباءنا الضرَّاء والسرَّاء} كما مسنا وهذه عادة الدهر وليست بعقوبة من الله فكونوا على ما أنتم عليه قال تعالى: {فأخذناهم} بالعذاب {بغتة} فجأة {وهم لا يشعرون} بوقت مجيئه قبله.