I know it's hard but you have to put yourself out there. I have suffered from social anxiety since my teens. Spent my 20/30s not going out and in my 40's started joining groups etc. it's been bloody tough and nearly 10 years later I've finally started to make friends.
It's hard when there cliques and you feel like the outsider, nobody talks to you. I've had to go upto people and talk to them, you have to approach people, stop waiting for people to contact you and invite them or invite yourself if you hear about an event. I still have good/bad days and come home and cry as feel so alone.
Google for groups or organisations in yr area, that support people with mental health, loneliness as it's easier with people who understand what you're going through. She if your doctor has a social prescriber worker whose job is to help with loneliness.
I've tried it all walking, running, cycling, cinema , gardening groups, board games, meet up, craft groups, Inner wheel, WI, walking netball, walking football, Tuneless choir, Find groups with mind, canal trust, football clubs, libraries. I know it maybe hard if you're in a scheduled area.
I've met 100s off people and clicked with about 2 people in 10 years, who I got on with and started doing stuff together, outside groups we met.
But don't give up, you'll have to attend events many times to get to know people. I wanted everyone to like me but that's not going to happen.
I wish you luck, I've never tried meeting people online as it's not my thing but that's other option.