Try to reset Microsoft store using these steps:
> Press the Windows + R key to open the Run dialog box.
> Type wsreset.exe and press Enter.
> A blank Command Prompt window will open for a few seconds, and then it will close automatically.
> The Microsoft Store will open.
> Restart your PC and test.
If you're still unable to install Minecraft Launcher through the Microsoft Store, consider using the Xbox app:
> Open the Xbox app on your PC.
> Search for Minecraft Launcher and attempt to install it from there.
As a last resort, you can download Minecraft Launcher directly from the official website: https://www.minecraft.net/en-us/download
> Once installed, proceed to repair and reset the app as outlined in the steps in the link I provided earlier.
Please try these options and let me know if you encounter any difficulties or if the issue persists.