Drupal 8 load term by substring
You can use the SQL operator LIKE in an entity query and append the wildcard % to the string:

$result = \Drupal::entityQuery('taxonomy_term')
  -&gt;condition('name', 'david%', 'LIKE')
  -&gt;condition('vid', 'tags')
  -&gt;execute();

$terms = \Drupal::entityTypeManager()
  -&gt;getStorage('taxonomy_term')
  -&gt;loadMultiple($result);