First, press Win+R, paste
msdt /id WindowsUpdateDiagnostic
into the box, and press Enter. There's a yellow warning at the bottom with a link that takes you to a page saying that msdt will be removed next year, but when needed you can still get to the troubleshooter like explained on this page:
Windows Update Troubleshooter - Microsoft Support
If the issue persists, run
sfc /scannow
and
dism /online /cleanup-image /restorehealth
as an administrator.
Resetting the Windows Update components like someone else told earlier in the thread AFAIK has the side effect of clearing your Update History so, if you prefer to keep that history when possible, maybe you might want to consider to hold off the reset at least until you already tried the above mentioned possible fixes.