In
Configuration::getConfigTreeBuilder()
your are apparently missing return type: TreeBuilder
As a result I have a conflict between Symfony 7.1:
https://github.com/symfony/symfony/blob/7.1/src/Symfony/Component/Config/Definition/ConfigurationInterface.php::getConfigTreeBuilder()
and tetranz/select2entity-bundle 3.1.0 (with PHP 8.2):
https://github.com/tetranz/select2entity-bundle/blob/master/DependencyInjection/Configuration.php::getConfigTreeBuilder()
Please, tell me what to do or when you possibly can repaire it.