Based on this blogpost.
Install with Homebrew:
$ brew install postgresql@14
(The version number 14
needs to be explicitly stated. The @
mark designates a version number is specified. If you need an older version of postgres, use postgresql@13
, for example.)