Hi Aroosh,
I'm Anwille, an Independent Advisor.
Sorry to hear you're experiencing this issue.
Error code 0xC004F074 means No Key Management Service (KMS) could be contacted.
In the Application Event Log, identify each event that has Event ID 12288 and is associated with the activation attempt. Troubleshoot the errors from these events.
For more information about troubleshooting DNS-related issues, see Common troubleshooting procedures for KMS and DNS issues at https://docs.microsoft.com/en-us/windows-server....
Hope this helps. Let us know if you need more assistance.