apt install postgresql-18
beginner Install the current major release on Debian or Ubuntu from the official PGDG repository instead of the older distro package.
Example
sudo apt install -y postgresql-common
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
sudo apt install -y postgresql-18
pg_lsclusters
Tip: The Debian packaging creates and starts a cluster called 18/main automatically; pg_lsclusters lists every cluster with its port and data directory.