Windows PowerShell 5.1 is the legacy version included with Windows and built on the older .NET Framework. PowerShell 7 is the newer version built on modern .NET, with better performance, improved scripting features, parallel execution, better remoting, cross-platform support, and ongoing development from Microsoft. Most new PowerShell improvements now target PowerShell 7, while 5.1 mainly remains for backward compatibility with older Windows modules and administration tools.
Your issue is caused by the package ID being incorrect. The correct Winget package ID is Microsoft.PowerShell, not Microsoft.Powershell. Try:
winget search --id Microsoft.PowerShell
Then install using:
winget install --id Microsoft.PowerShell --exact
If it still says no package found, update Winget/App Installer through the Microsoft Store and retry. You can also install PowerShell 7 directly from Microsoft by downloading the latest x64 MSI installer from https://github.com/PowerShell/PowerShell/releases
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin