Custom 404 page not working
Are your sure you did all the steps? Step 1: in mytheme.theme
/**
 * Implements hook_theme_suggestions_HOOK_alter().
 */
function MYTHEME_theme_suggestions_page_alter(array &amp;$suggestions, array $variables) {

  $route_name = \Drupal::routeMatch()-&gt;getRouteName();
  switch ($route_name) {
    case 'system.401':
      // Unauthorized Access.
      $error = 401;
      break;

    case 'system.403':
      // Access Denied.
      $error = 403;
      break;

    case 'system.404':
      // Page Not Found.
      $error = 404;
      break;
  }
  if (isset($error)) {
    $suggestions[] = 'page__' . $error;
  }
}

Step 2: create the page--404.html.twig file
Step 3: clear cache
For some markup, check https://stefvanlooveren.me/blog/styling-404-error-pages-drupal-8