The domain name of your Mastodon instance is an essential part of how it functions within the network, and it is impossible to change it without breaking federation.
Let’s imagine you have an account @alice on a server Alice.com and follow @bob on the server Bob.com. Whenever @bob makes a post, his server (Bob.com) federates that post to Alice.com (your server).
Now, if you were to change the domain name used by your server from Alice.com to Carol.com, then whenever @bob makes a post, @bob’s server would attempt to federate the post to Alice.com, which would no longer be online. Also, Carol.com would never receive that post.
Similarly, if @bob followed @alice at Alice.com and you changed the server domain to Carol.com, any posts published after that change would not show up in @bob’s home timeline because @bob does not follow @email@example.com but @firstname.lastname@example.org.