When you don't have many friends and you start to question your adequacy in this area you can quickly get into a loop of negative reinforcement. You then tend to get edgier around people and thus more likely to goof up when you do meet new people. The lack of opportunities to quickly overcome any self-doubt through interaction in other comfortable relationships means that you dwell and focus on the problem. All in all it's not a healthy situation.
You have now reached a stage in life where friendships no longer come thick and fast and easy. That normally happens when you are a child plus you have some form of family to seek comfort from. You don't even think about these things because school and family give a multitude of connections with other people and the shared experiences that create friendships. As you get older things change. The situations and events that foster good friendships by accident start to dry up.
You can counter this by thinking about your previous friendships and what made them work. Normally they come out of shared experiences and memorable events. You now have to actively manage the creation of shared experiences and memorable events rather than leaving it to chance. Join clubs and societies. Attend evening classes for favorite hobbies. Then start to organize social events. That's a skill that takes some developing so learn from any early discouragements and keep going with it. Even if you never become the life and soul of the party you can still have a very active social life through making it easier, better and more fun for other people to have a very active social life.
Nick Pagan