Hi @Joseph K P
We recommend upgrading to the latest version of Windows Server. Running the latest version of Windows Server allows you to use the latest features – including the latest security features – and delivers the best performance.
You can upgrade to up to two versions of Windows Server at a time. Therefore, the upgrade path supported by Windows Server 2012 R2 is Windows Server 2016 or Windows Server 2019. Therefore, it is recommended that you upgrade to Windows Server 2019 first, and then upgrade to Windows Server 2022 if necessary.
About how to perform an in-place upgrade of Windows Server, please refer to this official document:
Perform an in-place upgrade of Windows Server | Microsoft Learn
Best Regards,
Hania Lian