In the settings.php file of Drupal 8 installations, there are two different types of variables; $settings and $config. In Drupal 7 we used only $conf variable.
What's the difference between $config and $settigns variables in D8?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
Settings are for early-bootstrap (you can't store the database credentials in the database) and environment specific things, like the path to the public file system. Things that are not meant to be exported/deployed.
That means in almost all cases in modules, you want to use the configuration API.