You can try the method below:
1) Open CMD as Administrator role.
2) Run Dism.exe /Online /Cleanup-Image /ScanHealth, "" /CheckHealth,and “” /Restorehealth.
3) Run sfc /scannow
If you want to reduce the hesitation, you can refer to this site to create a .cmd file to run all the functions above.
4) Perform windows update to the very latest Windows 10 version (directly to version 21H2) via Window 10 Update Assistant. It skips all of Microsoft's update failed errors. You can get the .exe at here.
Hope that this helps you. :)