Adding CSS to specific nodes doesn't work
See if the hook is being called or not.
Try printing some of the node variables inside the hook.
Also try adding the libraries based on path alias which is configurable anytime unlike nids which differ based on the instances.
If you are to follow path approach,

function themename_preprocess_page(&amp;$variables) {

   /*Get Url based on the url alias of current path */
    $current_path = \Drupal::service('path.current')-&gt;getPath();
    $Url = \Drupal::service('path.alias_manager')-&gt;getAliasByPath($current_path);
    /*Attached calendar script for this page alone */
   if($Url =="/contact/open-office-hour"){
     $variables['#attached']['library'][] = 'themename/calendar';
   }
}