How to access a settings value from php settings file in Drupal 9

To access a config value from settings.php,

Include the Settings class

use Drupal\Core\Site\Settings;

$path = Settings::get('file_temp_path');