ActivityPub supports alsoKnownAs and movedTo so that users can migrate their social graphs to a different server or software.
The annoying thing with ActivityPub is that your username/handle is tightly coupled to a particular server, and moving server requires you to change your handle. Everywhere you've mentioned/documented your old handle is now out of date.
Bluesky handles this a lot better. If you own a domain, you can use it with any Bluesky server by creating a TXT record for validation. Your username is the domain name - if you own example.com, you can be @example.com on Bluesky, without having to self-host it. If you move server, you don't have to change your username. Currently there's just one main Bluesky server but they plan to introduce federation at some point, and their protocol is already mostly designed for it.