When getting the error:

Failed when opening source(s); try the 'source reset' command if the problem persists.

Use this command as an admin:

Add-AppxPackage -Path https://cdn.winget.microsoft.com/cache/source.msix