Get the form to add a term to a vocabulary programmatically
$vocab_machine_name = 'tags';
$values = array('vid' =&gt; $vocab_machine_name);

$term = \Drupal::entityTypeManager()
  -&gt;getStorage('taxonomy_term')
  -&gt;create($values);

$form = \Drupal::entityTypeManager()
  -&gt;getFormObject('taxonomy_term', 'default')
  -&gt;setEntity($term);

$term_form =  \Drupal::formBuilder()-&gt;getForm($form);


Shorter way
$vocab_machine_name = 'tags';

$term = \Drupal\taxonomy\Entity\Term::create([
  'vid' =&gt; $vocab_machine_name,
]);

$term_form = \Drupal::service('entity.form_builder')-&gt;getForm($term, 'default');