Installing PostgreSQL is not as simple as you think. Just look at the many different pages on the internet when searching for how to install PostgreSQL on your system. Especially the many different types of problems that people have with these installations.
I’ve tried a simple ‘brew install postgres’. Everything works fine. But you will get a very basic, not configured, installation. You have to find out how to get the database working with the database psql client. When you simply want to have a local server or client to be able to communicate with Postgres a lot of configuration needs to be done.