What's the output of php -v via SSH?
If Composer has been executed with PHP 8, it might have installed the PHP 8 version of some of Flarum's dependencies. But if you run Composer with the same version as the webserver, Flarum should work fine on 7.4.
If there is indeed a mismatch between the web and command line version, there's usually a syntax to call specific PHP version, like for example php7.4 composer [...] The exact syntax might be different depending on the hosting.