If you're using macOS, just use postgres.app -
homebrew installations of #postgres are too much heartache.
(or use a containerized postgres)
Be sure to add psql to $PATH in .zshrc or whichever flavor you're using:
PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"