It's usually assumed that friends should be happy for you when you succeed, but it doesn't always happen.
This might be a part of their human nature, or they might be not your real friends in the first place.
Here are some reasons for that.
Comparison and self-esteem
When individuals perceive their friends as more successful, attractive, or accomplished, they may experience jealousy due to their own feelings of low self-esteem.
Fear of loss or abandonment
Jealousy can emerge from a fear of losing the friendship or feeling replaced by someone else.
If a person believes their friend is forming new connections or becoming closer to others, they may feel threatened and jealous.
Unfulfilled desires
Seeing a friend achieve something they desire but haven't been able to attain can trigger jealousy.
Jealousy may arise from a sense of envy and frustration about not having what the friend possesses.
Perceived unfairness
Jealousy may occur when individuals feel that their friends are receiving preferential treatment, opportunities, or advantages.
They may believe that they deserve the same opportunities and feel resentful if they perceive their friends as being unfairly favored.
Insecurity and fear of rejection
Individuals may worry that their friends are forming closer bonds with others, which can lead to feelings of exclusion or being left out.