How can I override the search result page title dynamically?
Here comes an example snippet on how to override the page title by URL query:

/**
 * Implements hook_preprocess_HOOK().
 */
function MYTHEME/MYMODULE_preprocess_page_title(&amp;$variables) {

  $current_path = \Drupal::request()-&gt;getpathInfo();
  if ($current_path == '/search/node') {
    if (\Drupal::request()-&gt;query-&gt;has('keys')) {

      // Get the searched string.
      $keywords = \Drupal::request()-&gt;query-&gt;get('keys');

      // As of https://drupal.stackexchange.com/a/232304/15055 we probably
      // need to ensure the cache gets busted.
      $variables['#cache']['contexts'][] = 'url.query_args:keys';

      // Set the new title.
      $new_title = new \Drupal\Core\StringTranslation\TranslatableMarkup('Search result for Article (@keywords)', ['@keywords' =&gt; $keywords]);
      $variables['title'] = $new_title;
    }
  }
}