Template override doesn't work
HI please follow the below steps.

Step 1: create routing 
docroot\modules\custom\product\product.routing.yml

product.custom_form:
  path: '/product/details/{product}'
  defaults:
    _controller: '\Drupal\product\Controller\ProductDetailsController::details'
    _title: 'Product Details'
  requirements:
    _permission: 'access content'
  options:
    parameters:
      product:
        type: entity:node

Step 2: create controller ProductDetailsController.php

docroot\modules\custom\product\src\Controller\ProductDetailsController.php

/**
   * Callback for route product.custom_form.
   */
  public function details($product) 

return [
  '#theme' =&gt; 'product-details',
  '#content' =&gt; [
    '#contextual_links' =&gt; [
      'node' =&gt; [
        'route_parameters' =&gt; ['node' =&gt; $product-&gt;id()],
      ],
    ],
  ],
  '#product' =&gt; $product,

];


}

Step 3:

In theme 
create file product-details.html.twig

docroot\themes\custom\mytheme\templates\product-details.html.twig

Sample code of above twig file:


    
        {{ product.title.value }}
        {{ title_suffix }}
        
            {% if product.field_title_description %}
                {{ product.field_title_description.value }}
            {% endif %}