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:10:107

And if Allah should touch you with adversity, there is no remover of it except Him; and if He intends for you good, then there is no repeller of His bounty. He causes it to reach whom He wills of His servants. And He is the Forgiving, the Merciful  

And if God afflicts you, smites you, with some hurt, such as impoverishment or illness, there is none who can remove it save Him; and if He desires good for you, there is none who can repel His bounty, that ˹bounty˺ which He has intended for you. He strikes with it, that is, with ˹such˺ good, whomever He will of His servants.” He is the Forgiving, the Merciful’.
القرآن:١٠:١٠٧

وَإِنْ يَمْسَسْكَ اللَّهُ بِضُرٍّ فَلَا كَاشِفَ لَهُ إِلَّا هُوَ ۖ وَإِنْ يُرِدْكَ بِخَيْرٍ فَلَا رَادَّ لِفَضْلِهِ ۚ يُصِيبُ بِهِ مَنْ يَشَاءُ مِنْ عِبَادِهِ ۚ وَهُوَ الْغَفُورُ الرَّحِيمُ  

{وإن يَمسسك} يصبك {الله بضر} كفقر ومرض {فلا كاشف} رافع {له إلا هو وإن يردك بخير فلا راد} دافع {لفضله} الذي أرادك به {يصيب به} أي بالخير {من شاء من عباده وهو الغفور الرحيم}.