DB is not connecting to metabase

We have hosted the Metabase on the GCE VM in GCP. We have a managed postgresql, in that we have created a user and given the view access to the user. But when we are connecting the user with the metabase its not getting connected and we are getting timeout.
With same user we are able to connect to different tool, such as pgadmin.

have you opened the firewall of the postgres to the metabase server?

Can you guide us here, if possible share us the document.