There seems to be tons of results on what you want to do with a simple Google search. Since you're the one that knows your specific requirements best, it's probably best you review those solutions. It would be difficult for us to tell you your solution, or test it properly. I Googled "powershell copy permissions from one folder to another" and got more than enough results.
Suggestion so you don't need to do this again: create a gitlab account and push your scripts/code to it. It's a free place to keep all of it so you never lose anything you write again. https://gitlab.com/users/sign_in#register-pane