وَلَا تَكُونُوا۟ كَٱلَّذِينَ نَسُوا۟ ٱللَّهَ فَأَنسَىٰهُمْ أَنفُسَهُمْ ۚ أُو۟لَـٰٓئِكَ هُمُ ٱلْفَـٰسِقُونَ Qur’an Al-Hashr (59:19)Wal a takoonoo ka a lla th eena nasoo All a ha faans a hum anfusahum ol a ika humu alf a siqoon a
I.e., by having made a deliberately wrong use of the faculty of reason with which God has endowed man, and - by remaining oblivious of Him - having wasted their own spiritual potential.
To forget Allah is to forget the only Eternal Reality.