I am new to QGIS. I forget the DB manager password
Is there a way to fix it?
Change in your pg_hba.conf file the line for localhost:
# TYPE DATABASE USER ADDRESS METHOD local all postgres trust host all postgres 127.0.0.1/32 trust host all postgres ::1/128 trust
Restart your postgres instance. It allows you to connect to the database as postgres user from localhost with no password. Start psql and change the password for postgres user and reset your pg_hba.con file.