How do I turn off notices only?
This configuration aligns with the options at Manage &gt; Configuration &gt; Development &gt; Logging and Errors (/admin/config/development/logging).
There are 4 error level options available. The levels with their corresponding values, i.e. the actual value for $config['system.logging']['error_level'] are:

None: hide
Errors and warnings: some
All messages: all
All messages, with backtrace information: verbose

For example, to only display errors and warnings, replace your current line with:
$config['system.logging']['error_level'] = 'some';