New users can be created via CLI or with SQL statements. This manual uses the CLI tool. There is no difference between database actions or CLI command, createuser is just a wrapper around the SQL command CREATE ROLE.
Roles subsumes users and groups, so to be precises we are create a new role and not a user
CLI https://www.postgresql.org/docs/current/app-createuser.html
login as root
switch to user the PostgreSQL user: su - postgres
run createuser --interactive --pwprompt to create a new user
satnmsnononoexample output
root@satnms7-dev:~# su - postgres
postgres@satnms7-dev:~$ pwd
/var/lib/postgresql
postgres@satnms7-dev:~$ createuser --interactive --pwprompt
Enter name of role to add: satnms
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n