Getting child term's Tid not the parent's
For the further references: I changed my code to this:

$option = [];
$terms = \Drupal::service('entity_type.manager')-&gt;getStorage("taxonomy_term")-&gt;loadTree('collections', $parent = 0, $max_depth = 3, $load_entities = FALSE);

foreach ($terms as $term) {
$key = $term-&gt;id;

if($term-&gt;depth == 0){
  $term = $term-&gt;name;
}
elseif ($term-&gt;depth == 1) {
  $term = '-'.$term-&gt;name;
}
elseif ($term-&gt;depth == 2){
 $term = '--'.$term-&gt;name;
}
elseif ($term-&gt;depth == 3){
  $term = '---'.$term-&gt;name;
}
elseif ($term-&gt;depth == 4){
  $term = '----'.$term-&gt;name;
}
 $option[$key] = $term;
}

$form['collection'] = array(
  '#type' =&gt; 'select',
  '#title' =&gt; t('In Collection:'),
  '#empty_option' =&gt; t(' '),
  '#options' =&gt; $option,
);


Sorry if I wasted your time.