Hello @Thomas ,
Thank you for your question and reaching out.
You are getting Access denied because C:\Program Files\WindowsApps\ is protected by Windows OS where all apps are resides.
If you want to get access then you need to get ownership of this folder from explorer then you can use it.
Below is similar threads how to gain access to this folder.
---
--If the reply is helpful, please Upvote and Accept as answer--