Thanks to Nebby, I have realized that I was wrong.
In Gen 1, there are 12 boxes available, and you can hold 240 Pokémon total in your PC.
In Gen 2, there are 14 boxes available, and you can hold 280 Pokémon total in your PC.
In Gen 3, there are 14 boxes available, and you can hold 420 Pokémon total in your PC.
In Gen 4, there are 18 boxes available, and you can hold 540 Pokémon total in your PC.
In Gen 5, there are 24 boxes available, and you can hold 720 Pokémon total in your PC.
In Gen 6, there are 31 boxes available, and you can hold 930 Pokémon total in your PC.
In Gen 7, there are 32 boxes available, and you can hold 960 Pokémon total in your PC.
In LGPE, there is 1 box available, and you can hold 1,000 Pokémon in it.
In SWSH, there are 32 boxes available, and you can hold 960 Pokémon total in your PC.
When you run out of PC space in gens 1-2, you can't throw Pokeballs.
In gens 3-8, you can throw Pokeballs but all caught Pokémon are automatically released.
Source (credits for this go to Nebby :)
Hope this helps! :)