The limit of max connections is a configuration on Postgres, but there are some considerations to take into account — this stack overflow answer: postgresql - How to increase the max connections in postgres? - Stack Overflow talks about what family of parameters to set.
Just need to remember that the connection count is also limited by RAM, so if you run out of RAM changing the settings won’t help much.
The actual config files are accessible here: Postgres DB connection limits - #2 by jerome