How to override markup in my .theme file? Below is markup from SearchController.php file. I want to change the "Search results" from my search page and also markup.

File : \core\modules\search\src\Controller\SearchController.php 

if (count($results)) {
  $build['search_results_title'] = array(
    '#markup' =&gt; '&lt;h2&gt;' . $this-&gt;t('Search results') . '&lt;/h2&gt;',
  );
}
I am afraid there is no way to fix this markup in theme file. In case you simply need to change spelling I suggest using string overrides as it is described in settings.php file.

$settings['locale_custom_strings_en'][''] = [ 
  'Search results' =&gt; 'New text',
];