- Working remotely by yourself every day sucks. Get a coworking space, shared office, work from a cafe, at least a few days a week.
- Go out. Riding a bike, hiking or even bringing your dog out three times a day keeps you stimulated and makes your body moving. Go to the mountain, go to the beach, go to rivers and parks.
- Join clubs that interest you. You like cinema? Join cinema a cinema talk, a book club, if you like a sport join a club that organise communal things. Doesn't really matter what, since nowadays there are clubs for everything.
- Take a brake from internet. After work, keep yourself busy doing things that don't involve using a screen and even try some hard blocking method to avoid using tech in public spaces.
All this things might help you finding people to connect. Your initial answer should rewritten: "How to be alone?" -> "How to meet people?". The individualistic culture created in the last few decades, exacerbated by social media create a loneliness epidemic; kids have less friend, same for adults, so many people I met told me that online dating sucks, more and more people are using brain medication for anxiety and depression. The situation is not good and individualistic thinking clearly is not working.
The real trick is not learning to be alone, but re-learning how to make friends and share parts of life with others. Humans are social animals.