Hello,
When you get error code 0x87E00196 on Microsoft Store/Xbox, this usually means that something is wrong with the Gaming Services package, therefore requiring you reinstall it.
Please open a PowerShell window (as admin) and then paste get-appxpackage Microsoft.GamingServices | remove-AppxPackage -allusers into the window, then push enter, and then once that's done, paste start ms-windows-store://pdp/?productid=9MWPM2CQNLHN and push enter. Once the Microsoft Store window opens, push install, and then once it installs, restart you PC.
After your PC restarts, try to install Minecraft again and see if it installs.
Let me know how this goes.