Why am i never enough?

My entire life I was always second choice. No matter if it was friends or guys they always picked someone over me. I’ve gotten cheated on in every single relationship ive been in. I’ve had best friends leave me for other people. It doesn’t make sense bc I’ve had people tell me how nice I am and how I’m such a good person but why won’t anyone stay?