Define custom twig page template for specific multiple node pages by nid - page--custom.html.twig
You can write a hook_theme_suggestions_page_alter()

/**
 * Implements hook_theme_suggestions_page_alter().
 */
function YOUR_THEME_NAME_theme_suggestions_page_alter(array &amp;$suggestions, array $variables) {
  if ($node = \Drupal::routeMatch()-&gt;getParameter('node')) {
    if ($node-&gt;id() == 2 || $node-&gt;id() == 4 || $node-&gt;id() == 20 || $node-&gt;id() == 40) {
      $suggestions[] = 'page__custom';
    }
  }