Like the author, I enjoyed wfh for some time, but also found this creeping crushing loneliness settling on my brain after some years. My solution was to find a co-working space that actually has a community (most spaces are just places to rent a desk). It's helped me set up a routine and get some water cooler talk in a few times a week.
But more importantly, through the community I've met some new friends, so my social life blew up. Now I rely less on the co-working space and more on meeting with the new friend group for sports and debates.
It's been an adventure in finding out what makes me tick and finding ways of addressing it in healthy ways.