Bismillahirrahmanirrahim:
Allah (swt) says (interpretation of meaning):
“Verily, We sent (Messengers) to many nations before you (O Muhammad صلى الله عليه وسلم). And We seized them with extreme poverty (or loss in wealth) and loss in health (with calamities) so that they might humble themselves (believe with humility).
43. When Our Torment reached them, why then did they not humble themselves (believe with humility)? But their hearts became hardened, and Shaytaan (Satan) made fair‑seeming to them that which they used to do.
44. So, when they forgot (the warning) with which they had been reminded, We opened for them the gates of every (pleasant) thing, until in the midst of their enjoyment in that which they were given, all of a sudden, We took them (in punishment), and lo! They were plunged into destruction with deep regrets and sorrows”
~Holy Qur'an: [al-An’aam 6:42-44]