Space Labels (also known as Space Categories) allow grouping of spaces.

If you have related spaces, you can use labels to group them together into categories. 

For more information, please see Atlassian's documentation on using space labels.

Users with Brikit Targeted Search installed have more options around visibility and searching based on space categories.  Check out Targeted Search Filters Page and Setting Filter Group Visibility to learn more.