Should you run into the situation where you need to reset the module config to the installation state (for what ever reasons), then this snippet might help you: \Drupal::service('config.installer')->installDefaultConfig('module', $module)
This post saved you a lot of time and headache?
Then I'd be very happy about a delicious coffee! Or a helpful book from my wish list.
Or are you looking for professional web software development?
Our experienced team at webks GmbH consults, develops & implements individual, innovative web, eCommerce, Drupal CMS & mobile applications.