How can you hide "Your search yielded no results." when no keywords have been entered on the search page?
First find out how this string got there in the first place. Simply search your codebase for the exact string Your search yielded no results.. In a Vanilla Drupal you'll find only 6 occurrences of this string. 5 of them in tests, and only one in a controller, the SearchController.

Looking into the SearchController you'll see that this string is part of a render array. Keyed as '#empty' and themed with '#theme' =&gt; ['item_list__search_results__' . $plugin-&gt;getPluginId(), 'item_list__search_results'],. This means you can target that pretty easily with a preprocess function. Let's go for item_list__search_results since you don't know of any plugin yet.

In your theme or module implement hook_preprocess_HOOK. Replace hook with your theme or module machine name and HOOK with the '#theme' key from earlier.

Now find out if any search query has been entered at all via if \Drupal::request()-&gt;query-&gt;has('keys'), and for safety let's also check if there's an 'empty' key in the $variables and then unset it. If you want you can tighten the condition now also on the plugin you'll find in $variables['context']['plugin'].

/**
 * Implements hook_preprocess_HOOK().
 */
function MYMODULE/MYTHEME_preprocess_item_list__search_results(&amp;$variables) {
  // ksm($variables);
  if (!\Drupal::request()-&gt;query-&gt;has('keys') &amp;&amp; isset($variables['empty'])) {
    unset($variables['empty']);
  }
}


Hint: Use the Devel sub-module Kint and its debugging function ksm() to have you any variable pretty-printed in the messages block of your site for easy debugging.