JAC if you change the domain but keep the same server, it might be as easy as moving the files and updating the url in config.php.
Of course you should also setup redirects from the old domain to the new domain if you need them. This needs to be done outside of Flarum.
If you're also moving from a server to another, there is some advice here https://discuss.flarum.org/d/2753-migrate-flarum-to-another-server