Microsofts Windows Server 2022 Evaluation ISO is the basis your installaion was built on.
Now you want to end the evaluation ad did buy a correct license. You did go to ACTIVATION, typed that ney key in and got that 0xc004f050?
Thats because your key was (ie) issued for Windows Server 2022 Standard and NOT for Windows Server 2022 Standard Evaluation.
So you have to switch your EVALUATION version to the real standard version to get your stnadard key accepted.
Do in cmd:
dism /online /set-edition:serverstandard /productkey:AAAAA-BBBBB-CCCCC-DDDD-EEEEE /accepteula
In case you are not dealing with the standard version like in the example you can get a list of the versions you can upgrade to via
dism /online /get-targeteditions