As the error message suggests, you need to enable customization first. To do so, first connect to Exchange Online via PowerShell: https://learn.microsoft.com/en-us/powershell/exchange/connect-to-exchange-online-powershell?view=exchange-ps
Once connected (with admin credentials), run the following cmdlet:
Enable-OrganizationCustomization