This is a relatively straightforward process actually!

Start off by checking your current edition:

DISM /online /Get-CurrentEdition

This should say ServerStandardEval or ServerDatacenterEval

You can see eligible upgrades with:

DISM /online /Get-TargetEditions

Editions that can be upgraded to:
Target Edition : ServerStandard
Target Edition : ServerDatacenter

To Convert

Make sure that you don’t have ADDS role installed (but it can be a member server) before upgrading. Also, disable NIC teaming first. Once this is done, you need to use a KMS key (GVLK key) to make the upgrade, before installing your retail key later:

dism /online /set-edition:ServerStandard /productkey:N69G4-B89J2-4G8F4-WWYCC-J464C

After the fact, install your MAK/retail key with a simple:

slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

If this errors out, remove your existing key first:

slmgr /upk
slmgr /cpky

Activate with:

slmgr /ato