CREATE TABLE in Postgres locks pg_class forever
Normal operations don't place a persistent lock on pg_class.

There must be a DDL command (CREATE TABLE, DROP TABLE or similar) that is blocked because of a lock, so that it cannot complete the operation.

Check for active sessions in pg_stat_activity, their query and if they are hanging.

Your CREATE TABLE is not blocked by a table lock, but by a row lock in pg_class.