Why do I Feel Okay Being Alone?

I avoid people with the best of them, and it is like self-sabotage because I fear that people getting too close means that I am open to people, if that makes sense. I tend to avoid confrontations and also intimacy just with friends because its easier. I struggle to be around people.