Reinstall default config from module without having to uninstall and install module - Drupal 8/9
Uninstall and install module may delete configuration along with contents. This will allow you to recreate or install everything in the config/install folder of your custom module:
\Drupal::service('config.installer')->installDefaultConfig('module', $module);