I want to override the template of the contact page
The contact page is a form, so you can theme it like any usual form:


Implement hook_theme in your theme to tell drupal you want to theme the form.
Create the template file


Example

/**
 * Implements hook_theme().
 */
function &lt;your theme&gt;_theme($existing, $type, $theme, $path) {
  return [
    '&lt;your form id here&gt;' =&gt; [
      'render element' =&gt; 'form',
    ],
    '&lt;another form id, if you have multiple contact forms&gt;' =&gt; [
      'render element' =&gt; 'form',
    ],
  ];
}


The form id depends on the machine name of your contact form. For example, if your contact form is named 'feedback', the form id will be

contact_message_feedback_form


Now drupal will by default look for the template file 

contact-message-feedback-form.html.twig


Place the twig file in where Drupal can find it, i.e. under the templates folder in your theme.

At the minimum, what you need in that twig template file is

{{ form }}


But you can control what is printed by doing so:

&lt;div class="from"&gt;
  {{ form.mail }}
&lt;/div&gt;

&lt;div class="message"&gt;
  {{ form.message }}
&lt;/div&gt;

&lt;div class="actions"&gt;
  {{ form.actions }}
&lt;/div&gt;

{# Renders the rest of the form #}
{{ form|without('mail','message','actions') }}