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:64:11

No disaster strikes except by permission of Allah. And whoever believes in Allah - He will guide his heart. And Allah is Knowing of all things.  

No affliction strikes except by the leave of God, by His decree. And whoever believes in God, in His saying that every affliction is by His decreeing ˹it˺, He will guide his heart, to endure it ˹patiently˺. And God is Knower of all things.
القرآن:٦٤:١١

مَا أَصَابَ مِنْ مُصِيبَةٍ إِلَّا بِإِذْنِ اللَّهِ ۗ وَمَنْ يُؤْمِنْ بِاللَّهِ يَهْدِ قَلْبَهُ ۚ وَاللَّهُ بِكُلِّ شَيْءٍ عَلِيمٌ  

{ما أصاب من مصيبة إلا بإذن الله} بقضائه {ومن يؤمن بالله} في قوله إن المصيبة بقضائه {يهد قلبه} للصبر عليها {والله بكل شىء عليم}.