One way is through shared goals. Suppose the characters are John, Lisa, Paul, Amy and Tom. They all live in a small town that is facing a flood. John has a boat. Lisa knows the safest routes. Paul is strong and can help with physical tasks. Amy has medical knowledge in case of injuries. Tom is good at communicating with the outside world. They interact effectively by working together towards the goal of saving the town from the flood. This involves cooperation, trust and using each other's skills.
The 5 characters can interact effectively by having different personalities that complement each other. Take Sam, Hannah, Mark, Becky and Mr. Green. Sam is very brave. Hannah is cautious. Mark is creative. Becky is practical. Mr. Green is experienced. In a short story, if they are in a situation like exploring an old, mysterious house. Sam might be the first to enter a new room. Hannah would warn him of potential dangers. Mark could come up with ideas on how to deal with any strange things they find. Becky would make sure they have all the necessary tools. Mr. Green would offer advice based on his past experiences.
They can interact through dialogue. For example, if the 5 characters are Ann, Bob, Carol, Dave and Eve. Ann could start a conversation about a problem she's facing. Bob might offer his opinion. Carol could add some humor to lighten the mood. Dave could provide a different perspective. And Eve could summarize and come up with a solution. This way, each character has a role in the interaction.