Drupal8 settings and config, override settings in settings.php, variable_get en variable_set
<?php
// Fetching The data via the container (old variable_get)
$data = \Drupal::config('my_module.settings')->get('my_setting_name');
// Fetching the data via the Settings class
use Drupal\Core\Site\Settings;
$settings = Settings::get('http_client_config');
$data = $settings['my_setting_name'];
// Old variable_set saving the configuration
\Drupal::configFactory()->getEditable('my_module.settings')->set('my_setting_name', $new_val)->save();
// Override the setting in the settings.php file
$config['my_module.settings']['my_setting_name'] = "The data";