If reinstalling fixed it, maybe next time, if it happens again, try
sfc /scannow from an elevated command prompt first, instead of going through the ordeal of a fresh install. These days (beginning with W7) the actual need to do a fresh install is extremely rare. Reinstalling should be a last ditch effort.
I have found if a simply reboot does not fix the issue, then just waiting it out works most often to resolve issues. This is because, unless an actual hardware fault/failure, it is highly unlikely I am the only one with the problem. And in that case, it is very likely Microsoft will soon release an update to address it.
And on the rare occasion a system file becomes corrupt, running System File Checker (SFC) will typically fix that too. I have 5 systems here and have not needed to do a fresh install since migrating them all to W10. And with the 2 that have W11, no need to reinstall with them either.
Microsoft has not been sitting on their thumbs since the early days of Windows when "format and reinstall" was almost a periodic, routing requirement. Windows, particularly W10 and W11 are very good at self-healing, if given time.
But of course, if it is an actual hardware fault, no update or re-install will help.
Another observation I have made over the years is this; the more users dink and change the default settings, the more issues they have that do require last ditch efforts to resolve.
I am just saying, in addition to self-healing, W10 and W11 are very good at keeping themselves secure and running optimally too.