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:41:49

Man is not weary of supplication for good ˹things˺, but if evil touches him, he is hopeless and despairing.  

Man never wearies of supplicating for good, in other words, he never ceases to ask his Lord for wealth and good health and other ˹good˺ things, but should any ill befall him, such as impoverishment or hardship, then he becomes despondent, despairing, of God’s mercy — this and what follows relates to ˹the attitude of˺ disbelievers.
القرآن:٤١:٤٩

لَا يَسْأَمُ الْإِنْسَانُ مِنْ دُعَاءِ الْخَيْرِ وَإِنْ مَسَّهُ الشَّرُّ فَيَئُوسٌ قَنُوطٌ  

{لا يسأم الإنسان من دعاء الخير} أي لا يزال يسأل ربه المال والصحة وغيرهما {وإن مسه الشر} الفقر والشدة {فيؤس قنوط} من رحمة الله، وهذا وما بعده في الكافرين.