So some things to consider in no particular order:
Shame about being lonely drives people to feel more lonely. Don't let that trap engulf you.
Take steps to explore your psyche and see if the roots of your loneliness are based in issues like self-esteem. Don't take this lightly. It's easy to dismiss, but if those forces are present in your life, they'll be very difficult to see clearly.
Are you religious? Go to church (or sangha or whatever). Got an addiction? Go to a 12 step group meeting. Like board games? Find folks that like to play and hang out with them. Seek out opportunities to interact with people preferably in the flesh, but online can work too.
Get a therapist. Or a spiritual guide. Whatever, as long as they understand how the human psyche works, and that you're there to work. If that suits you.
Don't underestimate loneliness. There's a reason why our most feared punishment is isolating people. Because it's terrible.
Learn to relish solitude. Don't let an idea about solitude trick you into thinking that being alone is good.
Humans are social animals. Not being part of the herd represents an existential threat to us. This is a major cause of suffering in our species.
Humans are solitary animals. Being part of the herd can be a major stressor for us. This is a major cause of suffering in our species.
Best of luck.