Twig problem

I have added a csv download to a page

public function submitForm(array &$form, FormStateInterface $form_state) { 
		blah blah blah


		$header = "Id" . ",";			  	
		$header = $header . "Date of entry" . ",";
		$header = $header . "First name" . ",";		
		$header = $header . "Surname" . ",";
		$header = $header . "Email" . ",";
		$header = $header . "Telephone" . ",";	
		$header = $header . "Code" . ",";
		$header = $header . "Please send me any further offers" . ",";	


blah blah blah


								
		header("Content-type: text/csv; charset=utf-8");
		header("Content-Encoding: utf-8");
		header("Content-Disposition: attachment; filename=anchor_entrants.csv");
		header("Pragma: no-cache");
		header("Expires: 0");	
		echo $header . "n" . $dataline; 
		exit;			
	}

The csv heading and contents are correct except first we have

 <section class="sub-header">			
      <div class="sub-header-inner">			
        <h1>Entrants admin</h1>			
        <a href=""></a>			
      </div>			
      <img src="/themes/custom/anchor/images/white-curve.svg" alt="">			
    </section>			
    <div class="content-wrap basic-wrap">	

in the csv file which is from the page twig. How do we stop it from appearing please?

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/22/feed