Please follow these steps to download, install and activate Windows Server 2022 Datacenter successfully:
1. Download your Windows Server version from Microsoft's website:
https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022
2. Choose "Windows Server 2022" and download the image file
3. Copy the required files to a DVD or an USB flash drive and perform the installation
4. To activate Windows Server, run the CMD as admin and perform the following command:
Dism /online /Set-Edition:ServerDatacenter /AcceptEula /ProductKey:XXXXX-XXXXX-XXXXX- XXXXX-XXXXX
(Instead of the X, please enter the product key)