Various things can cause an update to fail so it's like playing 'whack a mole'. One or several of these things should help. I usually cut to the chase and do steps 1-5 before trying WU again. If that doesn't work, then I'll do 6-7. Do step 8 as a last resort.
1. Disable all third party AV completely, including Malwarebytes. Make sure no instance is running in task manager.
2. Disconnect all non-essential hardware like external drives and docks. Check device Manager for any missing drivers. (look for yellow exclamation mark)
3. Run troubleshooter-settings-system-troubleshoot-other troubleshooters-windows update-RUN.
4. Reset WU
Reset Windows Update in Windows 11 Tutorial
5. If you use one, uninstall ANY third party app that alters the GUI. Restart and try WU again.
6. CLEAN UP COMPONENT STORE – Open a command prompt as administrator and type
dism /online /cleanup-image /startcomponentcleanup
Reference:
Analyze and Clean Up Component Store (WinSxS folder) in Windows 11 Tutorial
7. Verify there are no corrupt system files going into the update.
Open a command prompt as administrator and type
sfc /scannow
Pay attention to the scan results to see if SFC found anything it could not repair.
If it found corruption it could not fix followup with this command (note the spaces)
dism /online /cleanup-image /restorehealth
Restart computer
(Note-you can follow up with another
sfc /scannow command to make sure that dism repaired the files)
8. If it still fails, do a repair install of windows
Repair Install Windows 11 with an In-place Upgrade Tutorial