How can I apply different templates based on taxonomy hierarchy? I'm new to Drupal and I don't have extensive knowledge so I'm hoping I can get this question answered.
I want the taxonomy pages of lower hierarchy to be displayed differently from the higher by applying a different tmeplate.
Is there a way in Drupal 8 to do this other than giving each term its own template?
What template exactly? taxonomy-term.html.twig, I guess?

You're looking for template suggestions. See Working with template suggestions on Drupal 8 for a similar question.

You can implement hook_template_suggestions_TEMPLATE() and then provide alternative file names for whatever condition you can think of.