It's easy to find precompiled packages to install postgres, rely on the official site to find binaries.
You will find instructions for all major operating systems, with details instructions to install the latest versions of postgres.
Please always follow the official instructions to install postgres.
If you need to install postgres from sources, see the chapter 17 of the docs.
There are also official container images if you need them.