I think this is quite an interesting question. Especially for the developer audience. If you're an engineer, then you likely have similar tendencies to a lot of other engineers. You want to spend time alone, but you also feel the need to combat this loneliness, isolation and depression that it leads to. You want to connect, but struggle to do so. The internet, software, reddit and other places became a safe haven, but then they perpetuated what was hindering you in the first place. I say these things because I'm that person. I lost decades to this sort of escapism that comes from an online world. Unfortunately the answers rarely work for us at the time we're going through this. It's rare for someone to just break out of the cycle. Something has to change, but it's a change that comes from deep within yourself.
Sometimes you have to reflect on the why. Why am I here, why am I in this situation. And often it's that deeper internal reflection that starts to motivate something, change something. Listen, I lost decades. And I still struggle. But no one else can solve this for you.
In terms of the loneliness epidemic itself. You have to split it into many separate categories. Isolation comes in many forms. For the online generation, who grew up with the internet, we are specific category. But I'll tell you, the path to fixing it has more to do with understanding why we are here than filling the time with arbitrary activities or socialising. Yes we need human connnection and yes we should explore, learn and grow. But fundamentally the first question we should be asking, why am I here, what is my purpose, now what should I do with that.
In my case, I did find talking to someone helped, but only after coming to the realisation that I needed to talk to someone and then proactively seeking it out. As much as we want to solve the problem for many people, they have to walk a path before they can see the truth. We can offer alternatives, but people will only find what they're looking for when they're ready.