When playing MLB the Show 23, the developers want players to stay in the games. When two opponents match up online and play each other, it's not really fair for the second player to be left out if the first player decides to leave.
For this reason, there are cooldown timers. When a player leaves early, they can't play another game for a while. This can last a few hours. It is very unfortunate for anyone.
So when the game is implementing cooldown timers for MLB the Show players who have been forced to leave the game, it's not very much fun for anyone. The game can freeze and cause players who leave to face a cooldown.
Bug fixes for MLB the Show 23 cooldown issues
Unfortunately, there's currently no fix for this. Eventually, Sony will release a third major game update to fix all the bugs currently in the game. Until then, players will occasionally run into freezing problems.
If the game freezes, it is advisable to stay in the game until it's over. While this can take a while, it's shorter than the multi-hour ban from a cooldown timer. It's very annoying, but right now it's the only option.
Once you're out of the game, you can try various troubleshooting methods like restarting the game, console, or internet. You can also log in and out of the account and start over to try and prevent it from happening again.