This is done so that you may not grieve for the things that you miss, or be overjoyed at what you gain; for Allah does not love any vainglorious boaster,
Meaning:-
Vainglorious: showing too much pride in your own abilities or achievements
Boaster: a person who boasts or brags