RE: Windows Update failed
Well there could be several reasons for failing updates installation but before going into hardcore troubleshooting i will suggest you to fist check if your Time is set correct on your Computer and matches the domain time.
If it is correct then launch RUN command and try to Re-register the following DLLs for the update Engine:
net stop wuauserv click [OK]
regsvr32 wuapi.dll click [OK]
regsvr32 wuweb.dll click [OK]
regsvr32 atl.dll click [OK]
regsvr32 wups2.dll click [OK]
regsvr32 wuaueng1.dll click [OK]
regsvr32 wups.dll click [OK]
regsvr32 MSXML3.dll click [OK]
regsvr32 wucltui.dll click [OK]
regsvr32 wuaueng.dll click [OK]
net start wuauserv click [OK]
Now turn off all Firewalls and Defender, reboot you system and then start running the updates again. See if it gets installed now.
Re: Windows Update failed
Thank you very much for the help Janos. I followed all the steps you mentioned above and now it seems to be working fine. So far it has hinished installing more than 80% of the updates.