Given a taxonomy term id, how do we get the value of other fields; specifically the machine_id?
The machine name is the vid:
if you search for machine_id inside taxonomy module there is no machine_id field declared.


But if you look at core/modules/taxonomy/config/schema/taxonomy.schema.yml you can see that:

vid:
  type: string
  label: 'Machine name'


So to get the vid (Machine name) you should use getVocabularyId
something like:

$product_name_id = $product_name_reference-&gt;getValue()[0]['target_id'];;
$product_name = \Drupal\taxonomy\Entity\Term::load($product_name_id);
// Vid or machine name.
$vid = $product_name-&gt;getVocabularyId();