Try.
Click “Start” > settings > update and security > troubleshoot > additional troubleshooters
Scroll down > click windows store apps > run the troubleshooter
Repair MsStore app.
Click “Start” > settings > apps > click microsoft store > advanced options.
Click > terminate > reset > repair
Restart PC
Also “repair” xbox app.
Restart PC
In windows seacrh bar type
powershell
right click on powershell and select run as administrator

Copy the following command and paste into powershell window (right click to paste into powershell window)
Remove-Item -Path “HKLM:\SYSTEM\CurrentControlSet\Services\GamingServices” -Recurse
press enter
Copy the following command and paste into powershell window
Remove-Item -Path “HKLM:\SYSTEM\CurrentControlSet\Services\GamingServicesNet” -Recurse
press enter
//////////////////////////////////////////
Restart PC.
/////////////////////////////////////////
Run powershell as administrator.

Copy the following command and paste into powershell window
start ms-windows-store://pdp/?productid=9MWPM2CQNLHN
Click Get