If you have nginx running as your main server that handles web traffic, then you would need to proxy the traffic from nginx to Mattermost.
So, nginx keeps running on 443. Mattermost runs on 8065. What you would need to do is setup nginx to do a proxy_pass
to Mattermost. See here for an example: Configuring NGINX as a proxy for Mattermost Server — Mattermost 5.32 documentation
If you already have an existing domain, you would need to create a new one that will handle only Mattermost traffic, and edit the nginx config appropriately to handle traffic from that domain.
There are lots of example on the internet that will show you how to setup nginx to handle multiple domain names.
Hopefully that helps!