Online communities are not a slack channel, a discord server or a forum. Community is a service.
People join a community for a reason. They have expectations. Just like they have expectations when they buy any other service or product. They need something and the way to satisfy that need is by joining an online group.
If this is true then a community is a business unit of your company or project. It needs careful consideration of why it exists, what is the audience and what's the experience for members. Think customer experience and user experience.
What are some aspects to consider for the experience?
It's interesting how these are the types of questions you need to answer for any business.
Also makes it easier to think about a community. The strategy and the process to build and maintain one.