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:63:9

O you who have believed, let not your wealth and your children divert you from remembrance of Allah. And whoever does that - then those are the losers.  

O you who believe, do not let your possessions and your children divert you, distract you, from the remembrance of God, ˹from˺ the five prayers; for whoever does that — it is they who are the losers.
القرآن:٦٣:٩

يَا أَيُّهَا الَّذِينَ آمَنُوا لَا تُلْهِكُمْ أَمْوَالُكُمْ وَلَا أَوْلَادُكُمْ عَنْ ذِكْرِ اللَّهِ ۚ وَمَنْ يَفْعَلْ ذَٰلِكَ فَأُولَٰئِكَ هُمُ الْخَاسِرُونَ  

{يا أيها الذين آمنوا لا تلهكم} تشغلكم {أموالكم ولا أولادكم عن ذكر الله} الصلوات الخمس {ومن يفعل ذلك فأولئك هم الخاسرون}.