Download your Windows Server version from Microsoft’s website:
https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2019
Dism /online /Set-Edition:ServerStandard /AcceptEula /ProductKey: XXXXX-XXXXX-XXXXX- XXXXX-XXXXX
(Instead of the X, please enter the product key)