I have created a modern SharePoint Online intranet for my company. It is required for me to add the full path hierarchy of the current sub-site a user is visiting.
For example, when I visit the IT sub-site it should show the path in the header like:
Home > Department > IT
This path will help to navigate between sub-sites easily and tell the user the path he took to reach this sub-site.