In Drupal 8 how to do dynamic form field rendering via Ajax

Here is my code bit public function buildForm(array $form, FormStateInterface $form_state) { $this->wrapper = ‘taxonomy-wrapper’; $query = Drupal::entityQuery(‘taxonomy_vocabulary’); $all_ids = $query->execute(); foreach (Vocabulary::loadMultiple($all_ids) as $vocabulary) { $vocs[$vocabulary->id()] = $this->t($vocabulary->label()); } $form[‘taxonomy’][‘vocabulary’] = array( ‘#type’ => ‘select’, ‘#title’ => $this->t(‘Vocabulary’), ‘#options’ => $vocs, ‘#empty_option’ => $this->t(‘-select-‘),[…]