How can I override the empty search message? What do I have to do to override the message 


  Your search yielded no results


from core search module inside core/modules/search/src/Controller/SearchController.php?
You can implement template_preprocess_item_list (or hook_preprocess_HOOK to be precise) in your theme or module to override that.

/**
 * Implements template_preprocess_item_list().
 */
function MYTHEME/MYMODULE_preprocess_item_list__search_results(&amp;$variables) {

  $variables['empty']['#markup'] = '&lt;h3&gt;' . t('Foobar') . '&lt;/h3&gt;';
}