I think there are a few things going on.
A community is a great thing, in som many ways. We know it's one of the greatest protections against things like depression, for example, far more than the other bs programs and such that they try and implement in the health and education system.
But it's actually really hard to build a community. It's needs to be something that almost occurs naturally, people you see regularly, people you get to know over many years, a relatively stable network of people where you have some newcomers that can be integrated into that network. Everything in the way the modern economy operates work against communities like this forming. As does our culture which tends to value change and moving around.
Similarly, therer has been a lot of research on the actual physical ways communities form. If people have to always make an appointment, or drive or travel more than about 20 minutes when they do, mostly they won't do that. Other things get in the way. Physical proximity is far more important than most people realize. You can meet up for coffee when you have a spare hour, or maybe you happen to run into each other at the shop and grab a coffee. For example. People you see daily or several times a week for years at work, or the shop, or church.
This is why when kids played out and mainly went to local schools it was so much easier for them to build friendships. They didn't really need to be managed by parents.
The other related issue is hosting at home. For many people, hosting people at home is difficult. They don't have space, or they have issues at home that make it uncomfortable, it's too much an invasion of private space. What really helps is public spaces for people to meet, but there aren't always a lot of these available, or they are expensive.
In the end, our lives are set up in many cases so that developing these kinds of bonds is difficult. A friendship doesn't ever get off the ground.