This configuration setting is easy to get with the following snippet.

\Drupal::config('system.site')->get('name');