How to enable modules through configuration? I am trying to enable modules by adding them to core.extension.yml file without getting involved with Features, Configuration Installer or similar modules or profiles. The modules are enabled but their default configuration under module_folder/config/install or module_folder/config/optional are not imported. Is there a way to do this?
This will not works because you are only saying to Drupal that your module is installed, but when you install a module there are other process that need to runs to import the configs and execute the .install functions.

But you can create a new module that will install all the other modules, create a .install file and add this inside:

/**
 * Implements hook_install().
 */
function MY_MODULE_install() {
  $modules_list = [
    'nbsp',
    'typogrify',
    'other_module',
  ];
  \Drupal::service('module_installer')-&gt;install($modules_list);
  drupal_flush_all_caches();
}


And then you only need to install this module that will install all the other modules.