Let me give you an answer that actually properly answers your question (doesn't involve talking to people, whether in-person or online, or even going outside): masturbation. No, really, I'm deathly serious. People like us don't have many options after all and so we're forced to cope the best we can.
I know from first-hand experience that loneliness just straight-up causes brain damage and that, even if you had hobbies before, you're eventually going to lose the capacity to enjoy anything that doesn't involve people in some way because your body is demanding that you go find people to continue the species with and won't let you enjoy anything else until you do. I'd say the only exception to this rule are certain types of Autistic people who lack any social instinct and can pursue their "special interest" alone without feeling lonely at all.
When you're genuinely lonely and socialising isn't an option, the only real long-term option, especially if you happen to be an extrovert like me, is some sort of chemical high to cover the pain. Obviously, I don't advise drugs/alcohol to achieve this chemical high as they will give you cancer and all sorts of health issues. Getting your body to make happy chemicals on it's own is obviously way healthier and, like I said earlier, our options are pretty limited.
Now, I don't know whether you're male or female (I speak as a woman here) but when you orgasm, whether with a partner or alone, your body produces tons of oxytocin (the love hormone) which, at least temporarily, makes you feel less lonely as your body can't tell the difference between that and actual sexual intercourse. Add a weighted blanket to the equation and it sends all the right signals to your body. Oh, and a slower build-up gives you a greater oxytocin release so take it nice and slow - try to relax a bit if you can. I personally can't make it work unless I'm wearing earphones and listening to spicy audio (r/GoneWildAudio) which I recommend as hearing a loving voice can do wonders for your monkey brain even if it is ultimately fake.
Another thing: you'll want to start learning to cook and eat healthy if you aren't eating a healthy diet already. A small amount of exercise (this can literally just be doing house chores quicker than you usually would) to get the blood pumping also helps. You'll want to do these things to increase your libido as the survival strategy here is to just start masturbating whenever you feel the loneliness getting too much.
Is it sad? Yeah, I felt pretty sad typing this and having my cope broken down into paragraphs on a screen makes me realise how fake it all is but, if it's any solace, I've managed to "play the social game" (pretending to be normal) and get people to like me before... it's all fake all as too (and takes soooo much more effort to maintain) which is why I gave up on that avenue. At the end of the day, do what you need to do to make the bad feelings go away... even if it is sad and fake.
Sincerely,
CumbriaCTB