You are good enough. Don't beg anyone to stay. People who wanna stay will eventually stay , they will figure out any means to be be in your life and the people who don't, they ll make lots of excuses even if you beg them to stay, they ll leave. You may make them to stay for a while but they ll leave no matter what. The only person who you can trust will never leave by your side is only going to be you and yourself only. You ll think they are perfect and you ll feel devastated knowing that you are losing them, there must be some problem withing yourself but that's not true, that's just happening for good, if they are taking your presence to be granted, they might be perfect for someone else but definitely not you. You need to feel special when you are with them and bit desperate.
People will come and go , you ll get attached, it's very human but you cannot depend on them to be the happiness in your life. It can only be you. So stop giving yourself hard time on people's leaving. Just be kind and patient. Don't blame yourself or feel weak. They are weak and they don't deserve you so they left and no matter what you could have done, they still would have. There can never be any valid or invalid reasons for a person to leave.
People who cannot fight to be with you don't deserve to be in your life. You have to accept this fact. There is nothing in the world you could have done differently to make them stay. Stop blaming yourself and believe in your karma that you ll find people who will never let you go no matter what, they ll fight for you, they ll know your worth, they ll be with you in your good and bad times, nothing can stop them from being there even not you yourself. You are good enough. You are independent and strong. So just stop waiting and carry on with your life. Focus on being good and be kind to people around you and the good right people will come into your life and you ll know why it didn't work out with those people before and everything going to be all right.