I've had the Loneliness Problem since I was a kid. I'm 30 now.
My big suggestions:
Find a therapist, if you can.
I know, I know. I actually didn't find a therapist until I was 26; I dug my feet in and told myself I didn't need a therapist for a very long time. It took an emotional break down - triggered by my abusive sex offender ex taking me to court for visitation with my kid - to get me to find a therapist.
Mental health is just as important as any other sort of health. If you go to the doctor when you don't feel well or when something is bothering you, you should go to the therapist similar mental health issues.
Therapists aren't one-size-fits-all, though. Finding the right one is super important.
Find your community and, maybe, your passion(s).
For me, this centers around writing and drawing. I shared writing and art online and garnered a few online friends.
I also am involved in political or activist stuff online.
People have made communities based on monster love, witchcraft, crafting hobbies, activism, analyzing media, playing particular games, etc. Facebook groups, social medial, certain hashtags, certain websites. There's a plethora of ways to get in contact with people who share your interests and talk about things you're interested in talking about.
This suggestion isn't just about building yourself a sense of community. This also plays into finding a passion or finding something that makes you feel fulfilled. Something you want to share with others. Which doesn't have to be one solitary thing; it can change. You can muck about and try a lot of different things.
My personal coping mechanism: Internal Counsel.
I have a group of characters that represent parts of me; I even talked to my therapist about this and she understood, right away, without me telling her what they represented.
I have mental dialogues, have explored situations, and have gotten comfort from them. These characters have been around since 2003 and I still have them. They're very dear to me and, in fact, one of them has been used for my Webtoon contest entry.
Part of the reason they helped me, however, was the fact I wanted to find that in real life. It drove me forward during my loneliest times. I wanted to find people I could talk to, could relate to, could trust. I still hope for that and that allows me to give people chances. That doesn't really happen often, honestly.
I'm not a highly sociable person. I don't socially drink, I don't care for sports, I don't go clubbing. I cringe over the thought of going out to intentionally make friends, since I have hurt feelings over past friendships and those wounds still hurt. I haven't had a consistent friend to hang out with in about 10 years. (Though I do have a girlfriend, kids, and dogs, so I have interaction.)
I don't do traditional "adult mingling" events, because they do not interest me.
I've become content and happy by addressing who I am, what I struggle with, what I want, and allowing myself to pursue those things.
I have told myself the "you're not alone" line. But that was more of a "There's 8 billion people on this planet. You're not the only one to feel this way." Which led me to creating stories, so others know they're not alone in their feelings, either.