This more a Server Fault kind of question, but try running psql like this:
sudo -u postgres psql
When you install PostgreSQL, there’s no user account created for your current user, so you’d have to create one.
That can be achieved like this (where masi is the wanted username):
sudo -u postgres createuser -sdrPE masi
solved To peek into kernel by socket failure with levels and kill-9