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

And let not their wealth and their children impress you. Allah only intends to punish them through them in this world and that their souls should depart ˹at death˺ while they are disbelievers.  

And let not their wealth and their children please you; God desires only to chastise them thereby in this world, and that their souls should depart while they are disbelievers.
القرآن:٩:٨٥

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

{ولا تعجبك أموالهم وأولادهم إنما يريد الله أن يعذبهم بها في الدنيا وتزهق} تخرج {أنفسهم وهم كافرون}.

See similar narrations below:

Collected by Qurʾān
quran:9:55

So let not their wealth or their children impress you. Allah only intends to punish them through them in worldly life and that their souls should depart ˹at death˺ while they are disbelievers.  

So do not let their wealth or their children please you, that is, do not deem fair Our graces to them, for this is a ˹way of˺ drawing ˹them˺ on by degrees ˹to punish them˺: God only desires thereby to chastise them in the life of this world, by way of the hardship that they encounter in amassing such ˹wealth and children˺ and the calamities ˹they suffer˺ as a result thereof; and that their souls should depart while they are disbelievers, so He punishes them in the Hereafter with the worst punishment.
القرآن:٩:٥٥

فَلَا تُعْجِبْكَ أَمْوَالُهُمْ وَلَا أَوْلَادُهُمْ ۚ إِنَّمَا يُرِيدُ اللَّهُ لِيُعَذِّبَهُمْ بِهَا فِي الْحَيَاةِ الدُّنْيَا وَتَزْهَقَ أَنْفُسُهُمْ وَهُمْ كَافِرُونَ  

{فلا تعجبْك أموالهم ولا أولادهم} أي لا تستحسن نعمنا عليهم فهي استدراج {إنَّمَا يريد الله ليعذبهم} أي أن يعذبهم {بها في الحياة الدنيا} بما يلقون في جمعها من المشقة وفيها من المصائب {وتزهَق} تخرج {أنفسهم وهم كافرون} فيعذبهم في الآخرة أشد العذاب.