Sounds like you need to change your default PHP version.
I assume php -v
returns 7?
You'll need to change the PATH.
Or this: https://wp-cli.org/docs/installing/#using-a-custom-php-binaryhttps://make.wordpress.org/cli/handbook/installing/#using-a-custom-php-binary