Team based or Hierarchy based Controlled Access to Leads/Opportunities

Dear All,

I have 2 questions related to CRM/Sales,

Question 1,

Is it possible to give team based access to leads/opportunities?
Ex. Members in Team A can view leads/opportunities assigned to Team A only. Team A cannot see other leads/opps and others cannot see Team A’s leads/opps.

If this is possible how to do it?

Question 2,

Is it possible to give hierarchy based access to leads/opportunities?
Ex. Tim and Tom are reporting to Sam, Tim should see only his leads/opportunities and Tom should see only his leads/opportunities, but Sam can see both Tim’s and Tom’s leads/opportunities

If this is possible how to do it?

Tried documentation, Teams, but couldn’t find a clue.

Really appreciate your help.

Thank you.