If someone cheats on you or leaves for someone they like more, it's no reflection of you.
It's happened to me twice and I wasted so much time trying to change myself to be more extroverted or whatever like I thought was more attractive.
Everyone likes different things, we are all great as we are. Someone will love you for who you are, they haven't left you for someone 'better'. Even if they think this other person is 'better' it really does not mean they are.
What they are attracted to is no reflection on you as a person.