WinGet is Microsoft’s command line package manager. WinGet often throws unhelpful errors on new Windows installations. These errors are usually due to Microsoft’s App Installer being out of date.
Microsoft App Installer is updated through the Microsoft Store. Searching the Microsoft Store for App Installer will not find the correct app. The correct app is here.
The linked Microsoft Learn article mentions installing the preview version of WinGet. Unless you need access to specific preview features, this is unnecessary. WinGet is included in App Installer.