I’ve always used this command to repair windows:
SFC /scannow
This was my goto drug for fixing windows problems but now I have learned about a bit of an undocumented fix which claims to be even better:
dism /online /cleanup-image /restorehealth
I will try it out from now on and report back on any good it does beyond SFC.