A hierarchy is a set of fields categorized in a hierarchical way that one level is the parent of another level. Values of the parent level can be drilled down to the lower level.
Create Hierarchy -
Right-click on the field you want to set as level 1 of the hierarchy in the fields list, and then select Create Hierarchy.

After that, you will see a new hierarchy created named your field name Category plus the word Hierarchy. This would have a hierarchy icon beside it and also an option to expand to the fields of the hierarchy. If you expand, you will see a copy of the Category field in there too.

Etc.
Reference:
https://radacad.com/what-a-power-bi-hierarchy-is-and-how-to-use-it