Hi @Test User ,
According to my research and testing ,please try to disable parameter setting "DenyAddAndCustomizePages". Here is the PowerShell script:
Connect-SPOService -Url https://xxxxx-admin.sharepoint.com
Set-SPOSite https://xxxxx.sharepoint.com/sites/xxxxx -DenyAddAndCustomizePages 0
Please add folder as Site Owner to the Style Library . It will not work if you just have "Member" permissions to the site.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.