I believe the root of your loneliness is your condition rather than your efforts or any lack thereof at forming social connections and creating friendships that are sustainable. Obviously since I don’t truly know you I could be mistaken, but intuitively I presume your issue is not an inability to make friends - that I believe you can do - but rather that your OCD is constantly putting up barricades in your mind preventing you from being able to keep them. This a struggle that afflicts nearly everyone who has OCD, and one of the cruelest aspects of it. It can cause desperate loneliness, self-enforced social isolation, and distressing inner turmoil. OCD is not a character defect or a flaw, and many afflicted with it have wonderful personalities and qualities desired in friends, but frequently do not recognize their own virtues and worth, and recede from socialization despite being hungry for it. From reading your posts I believe you definitely possess the traits desired in a friend. I see kindness in you. I do have faith that you can attain a thriving social life and fulfilling companionship and personal relationships, but I think you are going to need to actively obtain support and professional treatment for your OCD. Not treating it is sort of like trying to run a race on a broken ankle and faulting yourself for being too slow. You have to treat the true cause of the problem. Your personality, your efforts, are not the problem. Your OCD is your broken ankle.
Many with OCD retreat into video games played against others online as a way of having human connectivity that is less overwhelming than in-person interaction. This is what my cousin who lives with us does. It gives him satisfaction and solace, but it's fleeting, like how you can feel joy eating a slice of cake but it only lasts until you've taken the last bite. It doesn't give the true joy or fulfillment of friendships.
I do think there is value in reaching out to online communities, though. Look on Reddit and social media for groups specifically for OCD. You will feel less lonely in your loneliness when you realize how common it is with those who have OCD. You can read about other people's experiences and how they navigate through their lives with it. You're always welcome to share about your struggles here, but I don't think you'll be as understood as you would be in a group specifically for OCD. You want to be understood by people who understand because they've experienced what you've described. The typical age of onset for OCD is early teens through mid-20s so you’ll probably meet others close in age.
I have a very rare disease and the cause of my disease is rare. It's called Addison's disease, and mine was caused by chickenpox-induced sepsis when I was an infant that destroyed my adrenal cortex and extensively damaged other parts of my endocrine system and my stomach. It's very unlikely I'll ever meet anyone in person who has what I do, but online in special groups I have connected to others with pediatric AD, and it's been such a benefit and a relief. I've been treated by physicians who are the best specialists in the world for it since I was tiny, but none of them can really understand what it's like to actually live with the diseases. Hence the reason online communities have been valuable when I need a soundboard or to vent. Hopefully you can find comfort and helpful tips as well.
I think without addressing the OCD itself it’s going to be like building elaborate sandcastles too close to the shore. You’ll devote your time and expend your energy making something you rightfully feel proud of, only to then have it all knocked down by the next wave. And the waves will keep coming, so if you keep building on the same spot, it’s going to keep being demolished. You’ll become tired and dispirited and discouraged from wanting to continue to put in all the effort, so eventually you’ll stop and be less reluctant to want to try again. So you have to rethink your strategy now. If you haven't obtained professional help with treating your OCD I cannot more strongly encourage you to do so.
In tandem with reaching out to online communities and getting help for your OCD, I definitely encourage you to seek out low key social opportunities. I really don't think you'll "mess up" in any way but if that's a worry maybe you'd feel more relaxed trying out social groups that are a bit more detached from your university life, such as with MeetUp groups. If you don't like the activity or the people you meet, you'll have no obligation to go back and it's less likely you'll see them in your daily life. See if there's any groups on
MeetUp that might be a good fit. A friend who is shy found friendship through a group that meets to hike every Saturday, and another joined this cycling MeetUp. There probably are fun social options on your campus too, if you do want to join in, such as intramural sports teams, student clubs, and such.
Eta: You might want to see if there are groups for your university and city on Reddit. They may have ideas for activities / groups of interest.