Double check that your Windows is licensed and activated. From a command prompt you can run the command 'slmgr /dlv'
Also have you run any utilizes to disable things in Windows such as telemetry? If you disabled it completely Windows updates will stop working.
Another step would be to test for and attempt to repair OS corruption which can cause all sorts of random behavior.
From an elevated command or powershell prompt run
dism /Online /Cleanup-Image /RestoreHealth