How to load taxonomy term and get tid or term name in Drupal 8.

<?php

$term_id
= \Drupal\taxonomy\Entity\Term::load($tid)->get('tid')->value;
$term_name = \Drupal\taxonomy\Entity\Term::load($tid)->get('name')->value;

?>
Tags