First thing: don't force automatic updates or do a forced restart on your PC during an update. That makes everything worse. And be careful with random tools you find on the internet promising to "clean" Windows - lots of people screw up their system that way.
Start by checking if it's really a space issue. Open Settings > System > Storage and see if you have at least 10-15GB free on the C drive (where Windows is installed). Sometimes it's not even low space, but Windows gets confused because everything's so full. If that's the case, delete large files you don't need, empty the trash, and remove apps you don't actually use. If space is still tight, you can move some files to a USB drive or external disk.
Now, if space isn't the problem, try running the built-in troubleshooter. Go to Settings > System > Troubleshoot > Other troubleshooters and run "Windows Update". Let it run all the way through. If you keep getting an error, try temporarily disabling your antivirus while updating - sometimes they block update files thinking it's a threat. And if none of that works, try opening Command Prompt as administrator and run `sfc /scannow` (this takes time, be patient). That checks if system files are corrupted.