When you insert into an table it returns to you INSERT oid count
The oid
is the object identifier of the newly inserted row and
count
is the number of the rows inserted. Since the PostgresSQL 12, oid's are deprecated that's way it always returns zero.
If you want to use oids then it will only work in PostgresSQL < 12
and do so create the table as below
CREATE TABLE users (
id SERIAL PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
) WITH OIDS;