Unfortunately you cannot use Windows Server 2025 installation media to install Windows Server 2022. Each Windows Server release requires its own installation media.
Windows Server 2025 Standard OEM licenses generally include downgrade rights to Windows Server 2022 Standard, but Microsoft does not provide the downgrade media. The OEM that sold the server is responsible for supplying Windows Server 2022 installation media or recovery media if they support the downgrade.
If the OEM cannot provide the media, your options are to obtain genuine Windows Server 2022 installation media from another legitimate source (such as a Volume Licensing portal, Visual Studio subscription, or another valid Windows Server 2022 ISO) and install it using the Windows Server 2025 OEM product key if the OEM confirms it is eligible for downgrade. If online activation fails, Microsoft Activation Support can typically complete activation by phone after verifying the downgrade rights.
There is no supported method to modify Windows Server 2025 installation media, registry settings, or installation files to perform a Windows Server 2022 installation. You must use Windows Server 2022 installation media.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin