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:53:29

So turn away from whoever turns his back on Our message and desires not except the worldly life.  

So shun him who turns away from Our Remembrance, that is, ˹from˺ the Qur’ān, and desires nothing but the life of this world — this was ˹revealed˺ before the command to struggle ˹against the disbelievers˺.
القرآن:٥٣:٢٩

فَأَعْرِضْ عَنْ مَنْ تَوَلَّىٰ عَنْ ذِكْرِنَا وَلَمْ يُرِدْ إِلَّا الْحَيَاةَ الدُّنْيَا  

{فأعرض عن من تولى عن ذكرنا} أي القرآن {ولم يُرد إلا الحياة الدنيا} وهذا قبل الأمر بالجهاد.