When trying to update Windows 10 as holds a legacy registry for Windows Wsus server Setting has been tainted by external source ( as Intune or SCCM )
As long you are not using WSUS/ Intune/SCCM , this is a quick fix that will get your machine as it should and restore Windows Updates from Microsoft
If you were to use this technologies you will have to find the real reason why your environment is not pushing updates

Quick Fix:
- Open a powershell console as Administrator
- run :

remove-Item HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate -Recurse
3.Restart The computer to apply changes