if you are on 5.2.x as your signature suggest or even 5.3.x you cannot run it on PHP 7.4. You can't run it on MySQL 8 either. And no one will touch these old versions to make them compatible.
PHP 7.4 and MySQL 8 work only with XC 5.4.x.
The error you have posted is most likely with the 3rd party framework.
Considering the newest Symfony version requires PHP 8.0.2+ and a lot of the other 3rd party software XC uses are ready for PHP 8 yet XC 5.4.x is not I can assume they will not do anything about it. So 5.4.1.x will stay as is and maybe maybe 5.4.2 will be PHP 8 ready, or maybe 5.5.x and above only. When PHP 8 is being deprecated... maybe