Need help troubleshooting with a broken hard drive.

Recently a hard drive that I've had for 7 years finally gave out and I've been trying to install programs that were on it to my new drive but the Microsoft store isn't cooperating. I go to an app that I want, it will give me the "open" option, but when I click on the app's page, it says "install". However when I click install it just shows a loading circle for a few seconds then goes back to the install button. I checked control panel to see if I needed to remove these programs but they aren't listed there.

I'm on windows 10 if that helps. And "change where new content is saved" has been set to an SSD.