Managed paths allow you to specify a path that users will use to access your site contents. On migrating from SharePoint 2013 On-premises to SharePoint Online, the Client wanted to create managed paths /projects and /departments as in their existing on-premise environment.
Can we add a managed path in SharePoint Online?
Do you want to add a managed path to SharePoint Online? Unfortunately, SharePoint Online does not provide a mechanism for creating new managed paths, either via the SharePoint admin center or through PowerShell cmdlets (As of today!). In SharePoint Online, /sites and /teams are the only wildcard managed paths available to create site collections.
On Create site page in the SharePoint Online Admin center, choose “Other options” and you can pick either “Sites” or “teams” as the managed path.
The Classic new site collection creation page also offers the managed path selections.