Created SQL in azure Linux virtual machine and accessed in windows Pgadmin-4:

To enable remote configuration using pgadmin
Try to set password to access to Postgres user using below cmd:
sudo -u postgres psql
\password postgres
Now open the psql
to connect the request, you can use this psql -U postgres -c 'SHOW config_file'
to identify your config file.
sudo vim /etc/postgresql/12/main/postgresql.conf
sudo vim /etc/postgresql/12/main/pg_hba.conf
sudo systemctl restart postgresql
sudo systemctl status postgresql

Open the config file in connection and authentication click insert localhost with listen_addresses = '*'
:

On pg_hba.conf
file and add Ip address:
host all all 0.0.0.0/0 md5
host all all ::0/0 md5

Once you restart the PostgreSQL and it will give response with global 5432 and add port in virtual machine:

Now, when I check the connection its connected successfully like below:
psql -d postgres
\conninfo

If still issue persists, you can check this related thread by Leonard AB