If you get an error code while downloading and installing Windows updates, the Update Troubleshooter can help resolve the problem. Make sure you have internet access, then download the Update Troubleshooter version that matches your version of Windows.
Run the troubleshooter. When it's done, it's best practice to restart your device. Then check for new updates. Select Start > Settings > Update & Security > Windows Update, then select Check for updates and install any available updates.
If the problems aren't all resolved, try running the troubleshooter again to check for additional errors. Or see Fix Windows Update errors and follow the troubleshooting steps.