Connect to your SharePoint Admin center via Microsoft SharePoint Online PowerShell:
Connect-SPOService
type your admin center URL: https://<yourdomain>-admin.sharepoint.com
and login.
Run the command:
Set-SPOSite -Identity https://<Your site collection url> -DenyAddAndCustomizePages $false
Make sure the scripting setting in the admin portal matches what you set using PowerShell, or the site collection setting may be overridden again in the next 24 hours. You can find your settings by URL:
https://<yourdomain>-admin.sharepoint.com/_layouts/15/online/TenantSettings.aspx