yml settings file is just read on module install
This is normal, because if the user modifies the settings, he doesn't expect that the changes are overwritten by a module update.

If you want to change the settings in an update hook, you can use the config API.

\Drupal::configFactory()-&gt;getEditable('mymodule.settings')-&gt;set('mysetting', $value)-&gt;save();


In development you can export the complete config of your site once to the sync folder. There you will find the yml file: /sites/default/files/config_hash/sync/module_name.settings.yml.

Edit the yml file in the sync folder and import the config as often as you want until you find the final version. After you've finished the development you can copy the final version of the settings yml in the module folder.

For export and import you can either use the admin configuration interface or use drush config-export and drush config-import.

Another option is to directly edit the config on the command line:

drush config-edit module_name.settings


After closing the editor the settings are imported in the active config. After you've finished the development open the settings one more time and copy and paste the end result in the yml file of your module.