An entity reference field, by definition, can only target one entity type so you can know what your target type is by calling up getSetting()
on the field definition.
// Print the targeted entity type field.
$field = \Drupal\field\Entity\FieldStorageConfig::loadByName('node','field_tag''field_tags');
echo $field->getSetting('target_type');
Or better yet, use EntityReferenceFieldItemList::referencedEntities()
to pull up the node's referenced entities and the associated data you need.
// Return an array of Entity objects referenced in the field.
$node->field_tags->referencedEntities();