The error means you did not enter a valid product key. while the 2025 license may allow downgade to 2022, the 2025 product key is not valid for the 2022 install, you need a 2022 product key.
the ability to downgrade requires that you bought through Microsoft Volume licensing or software assurance agreement (SA)
To get the key via Microsoft Volume licensing:
If you have an SA agreement you may need to contact MS support to the key.