The hostname is not really required. For the webserver (apache), you can use a new virtual host with the new domain name. And then you can use the letsencrypt bot to issue a certificate for the new domain as well. You can even create certificates with two domains, however if you want to use the other domain for a different purpose, Iād keep them separated.
Thx for your help. My Nextcloud server is from HanssonIT. They pre-installed it with a menu to install/configure additional software/settings. I discovered that there was also an option to add/change the domain. So that did the trick.