For composer version, make sure both the
cli (command line) and
nginx (webserver) PHP configurations use the same default PHP version.
Some hosts that offer multiple PHP versions might use an outdated PHP version on the command line. Sometimes there's a switch for it in the management panel, or sometimes you can call a specific PHP version with its custom executable name.
As datlechin says, you should find error details in the Flarum log file. But if you installed Composer dependencies with the wrong PHP version, it's quite possible you ended up installing very old Flarum versions or dependencies.