The useProjectConfigFile config setting was deprecated in Craft 3.5 (and has done nothing since), and was finally completely removed in Craft 4.0.
To fix that error, remove any traces of the useProjectConfigFile config setting from your config/general.php file.
Note that if you previously had this setting set to false, it could be a good idea to familiarise yourself with the changes Craft 3.5 brought to project config (it has seen no significant changes since, so this is still current info, as of Craft 4.3).
Also good to know, is that the real reason you're getting that exception, is that Craft 4 is more strict about what you can put in the config/general.php file. In Craft 4 any setting in that file that isn't actually a core config setting – either because it has been removed from core at some point like useProjectConfigFile, or because it's a custom setting – will throw that error.
If you have any custom config settings in your general.php file that you want to retain, you can move them to a config/custom.php file, as per the official upgrade guide.