ive seen nothing but problems with attempts to do so, with the domain being such a core part of addressing in the fediverse.
even if you can get the old install database to reflect the new domain, all remote systems will not just magically know your domain changed… they will treat your old system as a ‘new’ instance.
youre better off just installing against the new domain.
oh, that changes everything!
personallly, id fix dns to your host and remove/install the server application. if its brand new, theres no reason you cant quickly just start over.