The ability to rename a site is a preview feature, so it’s not yet generally available within Office 365.
To rename a site, log on as a tenant global administrator, launch the Modern SharePoint Admin Center, go to Active Sites, and select the site you want to rename, and open the properties pane (Figure 1).
If the edit link is grayed out, it might be that the site is within the scope of a retention policy.
Renaming a Site with PowerShell
The latest version of the PowerShell module for SharePoint Online includes the Start-SPOSiteRename cmdlet.
More info at https://office365itpros.com/2019/05/02/sharepoint-online-rename-site-names/