add vocabulary taxonomy programmatically drupal 8 code example
Example: drupal 8 get taxonomy terms by vocabulary name
$terms = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadByProperties([
'vid' => 'vocabulary__machine_name'
]);
$terms = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadByProperties([
'vid' => 'vocabulary__machine_name'
]);