Surah Al-Hadid

57:23

لِّكَيْلَا تَأْسَوْا۟ عَلَىٰ مَا فَاتَكُمْ وَلَا تَفْرَحُوا۟ بِمَآ ءَاتَىٰكُمْ ۗ وَٱللَّهُ لَا يُحِبُّ كُلَّ مُخْتَالٍۢ فَخُورٍ

In order that you not despair over what has eluded you and not exult [in pride] over what He has given you. And Allah does not like everyone self-deluded and boastful -

Tafsir 57:23

O people! That is so that you do not grieve over anything you miss out on, and so that you do not show happiness that leads to arrogance over every blessing Allah has given you. Indeed, Allah does not love anyone who is arrogant and boastful over what Allah has granted him.