add CSS programmatically for a specific page in .theme file
I could solve the problem (thanks to @Eyal).

template.theme :

function template_preprocess_html(&amp;$variables) {

    $css_file_name = 'specific-page';
    $clean_alias = Html::cleanCssIdentifier($css_file_name);

    $activeThemeName = \Drupal::theme()-&gt;getActiveTheme()-&gt;getName();

    //OR

    $activeThemeName = 'template';

    $variables['#attached']['library'][] = $activeThemeName . '/' . $clean_alias;

}


template.libraries.yml:

specific-page:
  css:
    base:
      css/pages/specific-page.css: {}