Configuration Variables
Configuration variables can be done two ways in Drupal 8 depending upon whether you want your variables sync’d between production and development environments. Specifically,
Simple configuration (Config API) — Settings that require synchronization between different environments, e.g. site name, slogan, user account settings, etc.
Local configuration (State API) — Settings that are more transient or subject to change and which should not be synchronized between environments. e.g. the last cron run, the timestamp for statistics, last update time, etc.