In order that you not despair over what has eluded you and not exult [in pride] over what He has given you. And Allāh does not like everyone self-deluded and boastful -
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.