In case if you get access denied while working on the navigaton items in modern team site if publishing feature is activated. This is a knownn behaviour from Microsoft.
You need to run the following SharePoint online script below to enable ” add or Deny or customize page property for this new team site . To run , please log into as sharepoint online administrator of the tenant.
Set-SPOsite <SiteURL> -DenyAddAndCustomizePages 0
Happy SharePointing 🙂