Requirement: Hub Site is Collection of Sites which is connected to the master site from where all sites will be Navigated and Managed.
Create a Hub Site First we have to go to Admin in that go to the Sharepoint Admin Center Create a Communication Site give a Name as RP Site,then it is Created, Now Select the Site in top Navigation it will show the Hub option, now we have two options Register as hub site and Associated with a Hub . So, Select Register as hub site. Give the Hub Name, add the Users and Save it.

Go to another Communication Site i.e., BroadCasting Site in that go to Home then click on Edit , then click on Edit Navigation Next Add the Site Address and Site Name, after this click on Ok.

Again go to the SharePoint Admin Center. Select the RP Site In top Navigation it shows the option as Hub in that Select the Associated with a Hub in that give the Hub Site Name and Click on Save button. Then the Broadcasting Site’s Hub is RP Site.

we can also edit the hub association from the BroadCasting Site in that go to the App launcher select the Site Information and Change the Hub Site association as RP Site click on Save. Then New site associated with Hub Site.
