Some GTA Online players received a ban after switching to the game from GTA 5 story mode. The developers finally added this issue to their FAQ page and reported that players were not permanently banned.
We are aware of an issue where Grand Theft Auto V players on PlayStation 5 and Xbox Series X|S who switch to GTA Online via the character wheel are presented with an alert screen indicating that they are banned as a result of an error communicating with Rockstar Games Services. Please be assured that players are not being banned as a result of encountering this message.
— Rockstar Support
Some players have solved the problem on their own. The ban is probably related to the IP address. The problem can be solved by changing your router settings.