If you try to change the product key with a retail key it would give the prompt “This edition cannot be upgraded”

You can get the current version of the os by opening command prompt as admin and enter
DISM /online /Get-CurrentEdition

To get the list of editions it can be upgraded to
DISM /online /Get-TargetEditions

To upgrade Standard eval to Standard full use the generic product key within this command
dism /online /set-edition:ServerStandard /productkey:WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY /accepteula

To upgrade Standard eval to Datacenter full or Datacenter eval to Datacenter full
DISM /online /Set-Edition:ServerDatacenter /ProductKey:CB7KF-BWN84-R7R2Y-793K2-8XDDG /AcceptEula

Once done restart your computer.(it can take a while to come back up as it will mention adding features

Once logged in run this command