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:72:17

So We might test them therein. And whoever turns away from the remembrance of his Lord He will put into arduous punishment.  

so that We may try them, test them, therein, and so know, through knowledge outwardly manifested, the nature of their gratitude. And whoever turns away from the remembrance of his Lord, ˹from˺ the Qur’ān, We will admit him (naslukhu, or read ˹first person˺ yaslukhu, ‘He will admit him’) into a tortuous chastisement.
القرآن:٧٢:١٧

لِنَفْتِنَهُمْ فِيهِ ۚ وَمَنْ يُعْرِضْ عَنْ ذِكْرِ رَبِّهِ يَسْلُكْهُ عَذَابًا صَعَدًا  

{لنفتنهم} لنختبرهم {فيه} فنعلم كيف شكرهم علم ظهور {ومن يعرض عن ذكر ربه} القرآن {نسلكه} بالنون والياء ندخله {عذابا صعدا} شاقا.