Reinstalling Windows is sometimes unavoidable. I’ve done it plenty of times when a system was truly beyond saving. But it is also one of the most disruptive fixes ...
You can keep using Windows 10 safely if you meet these criteria and enable the right setting.
Right-click on the Task Manager, and switch to the Services tab Locate Trusedinstaller or Windows Installer Service, right-click, and start. If it doesn’t work, right-click and select Open Services.