Surah Al-Hashr

59:19

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

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

Tafsir 59:19

Do not become like those who forgot Allah by not fulfilling His commands nor refraining from the things He did not allow, so Allah made them forget themselves and they did not act upon that which would save them from the wrath and punishment of Allah. Those who forgot Allah and did not fulfil His commands or refrain from the things He did not allow are the ones who left the obedience of Allah.