The MX record tells the whole internet which server accepts mail for your domain. While it points at the old host, messages go there — and that is good, because it gives you time to move the archive calmly.
Change MX first and the unpleasant part starts: new mail lands on the new server, old mail stays on the old one, and some senders keep using a cached answer for hours or days. You end up with two live mailboxes and a manual merge.
The right order is the reverse: create the mailboxes, migrate the mail, confirm it is all there, and only then switch MX. By that point the archive is already waiting on the new side.