Moodle 5.0 or later requires at least PHP 8.2.0 (currently using version 7.3.25). Some servers may have multiple PHP versions installed, are you using the correct executable?