For centuries churches were the pillar of communities.
It wasn’t an accident. People didn't stroll by and decide to pop in. Churches worked hard to build their communities. They organized events for most nights of the week. Dances, games, prayer, social meetings, singing, music lessons, book clubs. They provided advice for people with problems. My nan used to go to church 5 nights a week. She met my granddad and her best friends there.
Churches also had dedicated community managers (priests). These priests built relationships with regulars. He know them and their families. If someone went missing, he came to find out why and bring them back. He worked hard.
It's the most obvious secret to developing a successful community; working hard. But too many organizations ignore this bit. They don't allocate the time or resources for hard work. They don't work out what events they're going to be hosting for their community, nor have someone actively reaching out to individual people at a time to bring them into a community. They don't actively pursue missing members and bring them back.
It worked for churches for centuries. In many churches it still does. Copy their work ethic, their community strategies and their simple tactics.