I (20M) was never really a social person and spendy my middle school alone but I was able to make some friends in high school
However, ever since I started my Bachelors I've struggled to make friends.
I've tried joining clubs or participating in events but even when I do manage to have successful conversations I can't manage to turn that into a friendship. Considering how the year just ended I'm not going to have a chance
I never minded being alone when I was younger but my loneliness is really starting to really affect me.
I've lost any internet in watching tv shows or movies or playing any games, I can't find the motivation to study and always feel tired.
I've also started to constantly fantasize about being in a romantic relationship and worry about if I'll be alone for the rest of my life despite the fact that I've never had any interests in relationships or even an IRL crush.
I also have a porn addiction that's growing worse and I'm worried about its long term effects on me.
I've also never had any online friends before which means I don't know where to start.
I'm going to suggest possibly irresponsible advice, but step 1 - you need to solve your depression and porn addiction, and ASAP. For that you could try therapy, and/or psilocybin or DMT... Not a heroic dose, but enough to get introspective from an altered POV. Therapy is the obvious long-term recommendation, but the psychedelic route may get you there faster, and you might learn a few things, such as your social obstructions or root causes.
Second, you need a close friend, at least one, preferably one who is also your desired romantic demographic. Maybe not someone who you'd normally "go for", but who you'd be happy spending time with - platonically, romantically, whatever it does not matter. The goal is to ground yourself with empathy for that person, and they for you too.
Opposite sex best friend is the absolute best move. Mine has saved me from so many dumb ideas and encouraged so many other dumb but good ideas and now will be the best wan at my wedding. 10/10 everyone should have an opposite sex bestie.
Edit: Same sex also works, sorry I'm tired and automatically thought of opposite sex. Either way this is solid advice.