This can be fixed by joining groups or activities that you enjoy. Friends are just people you enjoy being with. Overtime they can become people you learn to care about and even love like family. But it starts with having fun with them, or at least being likeminded somehow.
Also, fear is no way to live. Part of life is accepting that you will die someday, and most people die alone. Even the idealized version of dying, surrounded by family and friends, is no picnic for them or you. This usually entails being drugged or being otherwise "out of it." So don't worry about "being alone." The end is the same for everyone, and hopefully you won't even notice and you'll get to die peacefully in your sleep.
Life is for living and enjoying it as much as possible, and some people do enjoy being alone. However, living alone for a prolonged period of time is probably not THE healthiest thing to do because we are a social species and we do need physical contact. Having a pet like a dog or cat can help in this regard, but having someone who can always accompany you to doctor appointments, or go with you to events, or restaurants, or even just having breezy conversations with, really helps with having good mental health.
So I recommend cultivating friendships and partnerships, and doing your best to maintain them through the inevitable bumps in the road. But obviously, if these relationships are toxic and you find yourself feeling bad, then stay away from them, even if they are your blood relatives. Life is too short to spend time with someone unpleasant, but I promise that there are many people out there who are fun to hang out with, who are kind and generous, and who can become dear friends or life partners if you take some time to find them.
I wrote about how in more detail here: https://moviewise.substack.com/p/movie-wisdom-on-making-frie...