Dear Navalsinh Solanki, I’m Henry and I want to share my insight with your issue.
Since your Windows Server 2019 became deactivated after the hardware change, the first step is to check what type of license you are using. You can do this in an Administrator Command Prompt with: slmgr.vbs /dlv
Reference Slmgr.vbs Options for Obtaining Volume Activation Information | Microsoft Learn
If it shows as OEM, it cannot be moved to a new machine. In this case, you would need to get a new license.
Reference document: https://download.microsoft.com/download/6/A/1/6A1647EE-3FC7-47F2-9AFE-470AD5E5D856/OEMSoftwareLicensingRulesandRestrictions.pdf
If it shows as Retail, it can be transferred to a new machine. Even though Microsoft’s guide mentions Windows 10 and 11, the same steps apply for Server 2019:
- Go to Settings → Update & Security → Activation.
- Run the Activation Troubleshooter and select “I changed hardware on this device recently.”
- Sign in with the Microsoft account linked to the license.
- Follow the instructions to reactivate.
Reference document: Reactivating Windows after a hardware change - Microsoft Support
I hope you’ll give my recommendation a try and let me know how it goes and if this answer helps, feel free to hit “Accept Answer” so others can benefit too