Ever wondered how to display a list of sites in the context of the user? We can do this in the Modern SharePoint environment by using a Highlighted content web part. The following steps will help you with this:
Add the Highlighted Content web part to a page
Navigate to the page that you want to display the sites and edit the page. Find the location where you want the web part added from the web part gallery:
Configure the Highlighted Content web part
Click the edit button on the left side of the web part that was just added. Under Content –> Source, select, “All Sites” for Source –> Type, select “Pages”. Under the Filter section select “Content includes the words” and enter “sts_site” in the text box below.
You can then choose how to display the data such as in a list or grid as well as how many items at a time to display.