The config.local.php is a second settings file which can contain all the settings from the config.inc.php file and overwrites them if the corresponding setting is available.
The file can contain all settings from the config.inc.php file.
If you work with several instances, for example a live instance and a development instance, you can configure this file for the live system and overwrite the settings via config.local.php.
This means that you do not need two complete configuration files and you do not have to pay attention to which one you push onto your live system.
If you are working with a version control system such as GIT, it is advisable to include the file in the .gitignore so that it is not automatically included in your repository.