It looks like you did not configure n8n correctly (you did either not set up a domain for n8n at all or it is not configured correctly via the environment variable). Please follow one of our Installation guides. If you follow it you can be sure that everything will work correctly.
But also keep in mind what we have written on that page:
n8n recommends self-hosting for expert users. Mistakes can lead to data loss, security issues, and downtime. If you aren’t experienced at managing servers, n8n recommends n8n Cloud.