Step 1: You open cmd (run as administrator), then you type
dism /online /get-targeteditions
You will see Windows Server 2019 editions you can upgrade
Step 2: You copy and paste this code in cmd
If you want to upgrade to Windows Server 2019 Datacenter you type:
dism /online /set-edition:serverdatacenter /productkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /accepteula
if you see “upgrade failed”, you restart your Windows Server 2019. It will upgrade Windows Server 2019 Evaluation to Datacenter.