View / Twig Extension : Display other items with the same field value
I finally found a solution with a function in my Twig Extension.
I don't know if it's a clean way to do it but it works.

The function is called from the twig file :

{% set parts = partsSameId(part_id) %}

This is the simplified code inside the twig extension php file :

&lt;?php


public function partsSameId($part_id) {

    // Get nodes with the same part_id
    $nids = \Drupal::entityQuery('node')
      -&gt;condition('type','my_custom_content_type')
      -&gt;condition('my_custom_field_for_part_id',$part_id)
      -&gt;execute();

    // return array
    $html = [];

    // For each node returned, get the title.
    $i = 0;

    foreach ($nids as $the_node){
      $node = \Drupal::entityTypeManager()-&gt;getStorage('node')-&gt;load($the_node);
      $part_name = $node-&gt;getTitle();

      // return array
      $html[$i]['part_name'] = $part_name;

      $i++;
    }

    return $html;
  }