Microsoft provides a fully functional of Windows Server 2022. This is the only legitimate way to use the software without an upfront purchase.
Run the following command to convert the OS: dism /online /set-edition:ServerStandard /productkey:VDYBN-27WPP-V4HQT-9VMD4-VMK7H /accepteula how to activate windows server 2022 free