How can I get the taxonomy term name from a term ID?
Or you can simply use The entity Term class:

use Drupal\taxonomy\Entity\Term;


and in your code:

$term = Term::load($tid);
$name = $term-&gt;getName();