Username template cannot found

Seems the problem in the badge section in my forum; but im trying to run this command on container but i don’t know how;

Discourse.system_user.create_user_profile

This command would fix the badge issue; but i would apprecaite if someone provide how to run this command ? or where ?

[1] pry(main)> Discourse.system_user.create_user_profile
ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "user_profiles_pkey"
DETAIL:  Key (user_id)=(-1) already exists.

from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rack-mini-profiler-2.3.3/lib/patches/db/pg.rb:69:in `exec_params'
Caused by PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "user_profiles_pkey"
DETAIL:  Key (user_id)=(-1) already exists.

from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rack-mini-profiler-2.3.3/lib/patches/db/pg.rb:69:in `exec_params'

Thanks.