/**
* Add settings to site config.
*/
function MYMODULE_update_9001() {
$path = \Drupal::service('extension.list.module')->getPath('MYMODULE') . '/config/install';
$source = new FileStorage($path);
$config_name = 'MYMODULE.settings';
/** @var \Drupal\Core\Config\StorageInterface $active_storage */
$active_storage = \Drupal::service('config.storage');
$active_storage->write($config_name, $source->read($config_name));
}