In which file is the list of the installed modules saved?
You are looking for core.extension.yml. Directory for configuration synchronization is set up in settings.php with variable $config_directories.

Here is the documentation, but it's not full.