This is something the GM handles.
Not players. Methods include;
Playing multiple PCs - Bob, Jane, and Gr'arc are investigating the ruins of Tar'Koh. Mikkel and Swinsen have been hired to ferry Yorbo on his diplomatic mission to the merfolk. In the metropolis city, Yivref the Thief, Ponto, and his pet dog Foskin have uncovered a conspiracy with a particularly fishy scent. There's only 3 players in this campaign - at one point, Yorbo, Bob, and Gr'arc were the only PCs. But as their stories diverged, the GM let people play npcs/new PCs in the new locations - all intertwined, all part of the same story, but happening in different locations.
Off-Screen - if Bongo the Bugbear is heading off to his tribe to do his manhood ritual, that's cool and all but it gets exactly as much screen time as the rest of the party's downtime activities. He doesn't get 8 combat scenes and 20 hours of dialogue or whatever. If he wants to hammer out some details of what his ritual entails, he can do so via messages with the GM between sessions.
And Then The Samurai Rode Off Into The Sunset - if Jim the Druid is going to the Woods to do Druid Things for the forseeable future, that's cool, but like that means he's not really in the game. The game focuses largely on one group/location. Unless that player is cool just sitting out and occasionally getting a cameo or something, sounds like Jim becomes an npc, and that player needs to roll up a new character. Maybe later, once Jim is done with his Stuff he can come back - with a few levels to reflect his new druidic insights (coincidentally the same number the party gained!) and maybe a few stories to tell while Harry the Thief suddenly remembers some unfinished business he has to go deal with or retires to start an inn or whatever.
A very bad way to handle this however, is to take away agency from the player. 'Forcing' people to stay together, telling someone how to play their character, that they have to change who their character is, or what actions they can take (outside of things like 'no you can't fly by flapping your arms') is one of the fastest ways to kill their interest in a game.
Unless your goal is to drive someone away from the table, it is better to jump through almost any amount of hoops rather than restrict their ability to make the choices they want to make in a game. Sure, trying to attack the King with your longsword may make your character's life nasty, brutish, and short, but if someone tells you you simply can't do that, then it's likely to make the campaign's life nasty, brutish, and short.
This question seems to assume that a player not worshiping the same god the other players all decided to worship is bad, or wrong. This is only the case if an explicit agreement was made that everyone was rolling up 'characters faithful to X god', like it's part of the campaign premise that the GM states along with 'what setting the game is in' and 'what rule system the game is using'. This sounds perilously close to the above - taking away someone's agency, or at least judging them heavily for using it. That will tend to create bad feelings and steal all fun from the game where letting someone go off and do their own thing or whatever will not.
Finally, there is an assumption in ttrpgs that I call the multi-headed PC hydra. The PCs always go everywhere in a group. Whoever is best at any check with a chance of failure rolls it. In the opening microseconds of combat the PCs somehow all decide on a multi-pronged combat strategy by pure collective intuition and execute it with perfect precision. Courses of action are decided purely as a group, and often without anyone actually speaking in character. Etc etc. Beloved of dungeoncrawlers, this style of gaming is very boring and one-dimensional compared to playing characters that have their own goals, roll checks they are not perfect at, make mistakes, and fail. It's not mandatory at all, and it's not the 'best' way to play dnd. I have seen before and will see again people assuming that it's the best and only way to play though, so i'll mention here - it isn't. People can split up, fail, and do their own thing. A hivemind is not required for people to play pretend fantasy heroes with math rocks.