Get tag(term) name for multiple nodes without a performance hit
If you're already looping over an array of nodes, have you considered collecting the term IDs before loading them in one query? That should save a lot of the overhead of running multiple queries:

$map = [];
$tids = [];

// Collect IDs for each node:
/** @var \Drupal\node\Entity\NodeInterface[] $nodes */
foreach ($nodes as $nid =&gt; $node) {
  /** @var \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem $item */
  foreach ($node-&gt;field_tags as $item) {
    $tid = $item-&gt;target_id;
    $map[$nid][$tid] = $tid;
    $tids[$tid] = $tid;
  }
}

// Load terms and collect their labels:
$term_labels = [];
/** @var \Drupal\taxonomy\Entity\TermInterface $term */
foreach (Term::loadMultiple($tids) as $tid =&gt; $term) {
  $term_labels[$tid] = $term-&gt;label();
}

// Assign the term labels to each node.
foreach ($map as $nid =&gt; $node_tids) {
  foreach ($node_tids as $tid) {
    $map[$nid][$tid] = $term_labels[$tid];
  }
}