This post has been very helpful. Let me explain how I used the information in this post to fix the problem for myself.
I had to access the files in /Program Files/WindowsApps - which at first I needed to give myself ownership and subsequently permission to do. What I did not know is how this would affect me being able to download apps from Microsoft Store as well as the Xbox Beta PC App.
To change it back and restore my downloads, I followed the following steps:
1) While still being the owner of the folder in question, I opened Command Prompt with elevated privileges (right click > run as administrator) and typed in the following command:
icacls "C:\Program Files\WindowsApps" /reset /t /c /q
2) Pressed enter after entering this command, closing the Command Prompt window afterwards.
3) Went back into permissions for the folder (right click > properties > security tab > advanced) and clicked on "change" next to owner (at the top).
4) In the text box at the bottom of the next dialog, typed in the following and then clicked on "Check Names" box on the right hand side.
5) Clicked apply and ok on all dialog boxes, closing them all and restarting my machine.
There. Now you should have changed the permissions of the folder back to defaults, while being the owner. Then, you gave ownership back to the TrustedInstaller user which is used by Windows Update (and Microsoft Store / Xbox App) to install apps and games.
You should now be able to install things again.
If you still can't install things, make sure to follow the following steps:
1) Hold Windows Key and press R
2) Type "services.msc" and press enter.
3) Scroll down until you see "Windows Update" and right click, then select "Start".
Hope this helps!