drupal taxonomy_term code example
Example: taxonomy_get_children drupal 8
$children = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadChildren($entity->id());
$children = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadChildren($entity->id());