Drupal 9 Выберите данные узла с условиями запроса с помощью диспетчера типов объекта

use Drupal\node\Entity\Node;

// Various entity type manager query conditions and options
// that you can use to select node data from a drupal database.
$query = \Drupal::entityTypeManager()->getStorage('node')->getQuery();
// get only nodes of this content type
$query->condition('type', 'my_content_type_machine_name');
// that are "published" nodes
$query->condition('status', 1);
// and UUID equals..
$query->condition('uuid', $my_input_uuid);
// Sort by a value in a given field
$query->sort('field_my_custom_field', 'some value');
// To return a subset of the result
// This gives you only the first 10
$query->range(1, 10);
// execute query, it returns an array of matching node ids
$nids = $query->execute();

// LOAD THE RESULTING NODE OBJECTS
if (!empty($nids)) {
  $nodes = \Drupal::entityTypeManager()
    ->getStorage('node')
    ->loadMultiple($nids);
}
cnmdrupal