I've just got the same issue with MSI motherboard after updating the BIOS,
the solution was :
1 - Login to Microsoft account
2 - All devices
3 - Remove all old devices
4 - Start menu -> Settings -> Activation -> Troubleshoot -> Changed device
5 - Select the current Device using the name of the device ( if you have different devices with the same name change the name to differentiate it )
6 - Windows is Activated.