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:89:15

And as for man, when his Lord tries him and ˹thus˺ is generous to him and favors him, he says, "My Lord has honored me."  

And as for man, the disbeliever, whenever his Lord tests him and honours him, with wealth and other things, and is gracious to him, he says, ‘My Lord has honoured me’.
القرآن:٨٩:١٥

فَأَمَّا الْإِنْسَانُ إِذَا مَا ابْتَلَاهُ رَبُّهُ فَأَكْرَمَهُ وَنَعَّمَهُ فَيَقُولُ رَبِّي أَكْرَمَنِ  

{فأما الإنسان} الكافر {إذا ما ابتلاه} اختبره {ربه فأكرمه} بالمال وغيره {ونعَّمه فيقول ربي أكرمن}.