You cannot directly upgrade '12 to '22, you can however do an intermediate upgrade to a latter version of server 19 and do it.
However that is not the path I would suggest. Migrate is relative.
Is the system only an exchange server, does it hold other roles?
If only an exchange server, I would start a clean install, configure and test your new system until you feel comfortable cutting over.
If it has other roles there are still other paths. Of varied complication,I would not speculate until they are detailed.
IMO as fast as servers deploy this day in time, and in place upgrade is a last resort. Albeit they can be completely fine, the flip side of that is most systems are a different species than the creature that was installed, been through a lot of configs, and possibly admins... NO upgrade can account for everything, and they are known for biting people that dare to believe otherwise.
IF you can give us more details on the environment, we could likely suggest more depending.
Edit: I missed that last line...
In that case I would almost definitely start clean, add the second server as an domain controller, do exchange and configure it, test till time to cut over. The after all is confirmed, transfer all FSMO roles to the new DC, and demote the old.
IF the domain is large and complex,if not I would go with second clean install of everything.