You might see this error if the date and time for the device are incorrect, or Windows has trouble connecting to the online activation service and can't verify your product key.
To verify the date and time
- Select Start > Settings > Time & language > Date & time.
To check your internet connection
1. In the search box on the taskbar, type network troubleshooter, then select Identify and repair network problems from the list of results.
2. Follow the instructions to fix any problems with the network.
3. If the network troubleshooter didn't find any problems with your network connection, try restarting your device to see if that fixes the problem.
Use Registry Editor
Make use of the Registry Editor and follow the given steps to do so:
1. Press Win + R keys > in the Run dialog box > type regedit > hit Enter
2. Now as the Registry Editor opens, enter the given commands
3. Double click on MediaBootInstall> change its value from 1 to 0.
4. Restart your system
5. Now, open Command Prompt and enter the given command Slmgr /rearm
6. Restart your system to let the changes take effect.