I really like Joshua Aslan Smith's answer, and it says at least 90% of what I would've said. That said, I feel that it's missing a couple of things I'd like to suggest:
When your players want to split up, ask them to think twice.
When something like an imminent party split comes up, it's perfectly fine to break immersion for a moment and say something like:
OK, that seems like a perfectly sensible thing for your characters to do, but please keep in mind that we've only got one table and one GM here. If you guys split up, I can only focus on one group at at time, and the rest of you will have nothing to do. That's going to slow down the game a lot, and it might feel kind of boring. Are you sure your characters can't think of some reason to stay together instead?
This is particularly important if you're dealing with new players, who might not be familiar with meta-rules like "don't split the party" or "do what your character would do, but not if it breaks the game" yet.
Of course, it might turn out that your players are fine with being out of the game for a while — maybe one of the groups wants to take a break and get some snacks while the others play their half of the scene — or they might expect the split to be only brief and temporary (in which case you might want to warn the players if you think it might not be, or adjust your plans to make it so).
If one player wants to strike out on their own, let them know they won't get as much stage time.
Asymmetric party splits are a special case. Obviously, if your party is splitting into a one-person and a three-person group, you can't and shouldn't give both groups an equal amount of time in the spotlight. At the very least, you should give the "lone ranger" no more than one quarter of the stage time — and arguably, it should be less, because the single character's actions generally won't directly affect the rest of the group, and thus won't directly drive the story forwards for the other players, nor build up any intra-party dynamics.
So when a single player decides to strike out on their own, that's a particularly good spot to stop and ask them to reconsider, telling them something like:
OK, you can do that if you really want, but leaving the party like that means that you'll probably have nothing to do for the next half an hour or so. I'll let you attempt <whatever the character set off to do> and narrate any interesting minor details that might happen along the way, but there won't be any epic battles or anything like that for you until you return, because a one-player battle would just be boring for everyone else. Or you could just stay with the rest of the party, and try to find some other way to accomplish what you want.
If the party really won't stay together, consider replacing some characters.
This is probably more relevant to longer campaigns, where sometimes a particular character just might end up in a situation where they no longer have any reason to stay with the rest of the party: maybe they've accomplished all they set out to do, maybe they've ran into an irreconcilable conflict with the other characters, or maybe they just suddenly find themselves with other priorities that make it impossible for them to continue the adventure.
In that case, the natural thing is to ask the player to "retire" the character as an NPC, and roll up a new character instead. For a one-shot game, you might have some spare pre-genned characters that the player can choose from, or just pick an NPC that's already present. You can give the player the option of roleplaying their old character whenever their path crosses that of the party, or possibly even having the old character re-join the party at a later stage, if they again have a reason to. (Of course, that generally involves some character juggling, since you really don't want one player to play two characters, at least not more than briefly.) The important thing is to make it clear to your players that the game focuses on the party; if their character really wants to leave the party, they can, but that means they're no longer a player character.