How to apply suggested theme hook using hook_theme_suggestions_HOOK? Following this answer,  I'm trying to override core/themes/seven/templates/node-add-list.html.twig using hook_theme_suggestions_HOOK.

So, I added the following function in modules/custom/domain_filter/domain_filter.module

function domain_filter_theme_suggestions_node_add_list(array $variables) {
  $suggestions = [];
  $suggestions[] = 'node_add_list__' . 'custom';
  return $suggestions;
}


I created the custom twig file in my module: modules/custom/domain_filter/templates/node-add-list--custom.html.twig

The suggestion appear well in theme debug but it's not applied (the x is in front of node-add-list.html.twig):

&lt;!-- THEME DEBUG --&gt;
&lt;!-- THEME HOOK: 'node_add_list' --&gt;
&lt;!-- FILE NAME SUGGESTIONS:
   * node-add-list--custom.html.twig
   x node-add-list.html.twig
--&gt;


How to apply node-add-list--custom.html.twig?
Finally I found a paragraph in the documentation. When using modules, we need to register the template using HOOK_theme(). So, I added the following function in modules/custom/domain_filter/domain_filter.module

/**
 * Implements hook_theme().
 */
function domain_filter_theme() {
  return [
    'node_add_list__custom' =&gt; [
      'base hook' =&gt; 'node_add_list',
    ],
  ];
}


Then my custom template modules/custom/domain_filter/templates/node-add-list--custom.html.twig is now applied.