A role hierarchy represents a level of data access that a user or group of users needs. The role hierarchy ensures that managers always have access to the same data as their employees, regardless of the organization-wide default settings. Role hierarchies don't have to match your organization chart exactly. Instead, each role in the hierarchy should represent a level of data access that a user or group of users needs.
Resource:
Control Access to Records - Trailhead - https://trailhead.salesforce.com/en/content/learn/modules/data_security/data_security_records
In this lesson, we grant the ability for administrators to log in as other users in our org. We then adjust the Session Settings to unlock the Force relogin after Login-As-User setting. We also adjust Jim Doe’s profile to make him a Lightning Experience user.
In this lesson, I place myself at the bottom of the Role Hierarchy and place Jim Doe above me as my manager.
We then demonstrate how Jim is unable to create a new Account record.
Ownership-based sharing rules allow for exceptions to organization-wide default settings and the role hierarchy that give additional users access to records they don’t own. Ownership-based sharing rules are based on the record owner only.