Hello
Thank you for your question and reaching out.
DISM /online /Get-CurrentEdition
To know the possible target version of the windows server run the below PowerShell command,
DISM /online /Get-TargetEditions
Now that we know the target version, run the below PowerShell command to activate windows.
DISM /online /Set-Edition:ServerDatacenter /ProductKey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx /AcceptEula
DISM /online /Set-Edition:ServerDatacenter /ProductKey:
xxxxx-xxxxx-xxxxx-xxxxx-xxxxx /AcceptEula
--If the reply is helpful, please Upvote and Accept as answer--