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:59:19

And be not like those who forgot Allah, so He made them forget themselves. Those are the defiantly disobedient.  

And do not be like those who forget God, ˹those who˺ neglect obedience to Him, so that He makes them forget their own souls, ˹to forget˺ to send ahead good deeds for its sake. Those — they are the immoral.
القرآن:٥٩:١٩

وَلَا تَكُونُوا كَالَّذِينَ نَسُوا اللَّهَ فَأَنْسَاهُمْ أَنْفُسَهُمْ ۚ أُولَٰئِكَ هُمُ الْفَاسِقُونَ  

{ولا تكونوا كالذين نسوا الله} تركوا طاعته {فأنساهم أنفسهم} أن يقدموا لها خيرا {أولئك هم الفاسقون}.