I suspect the PHP version of your php binary is outdated / does not match the one you’re using for the web. It’s possible there are other versions already installed in your hosting environment. They may be accessible as php80 or similar.
You’ll need to use an appropriate version that is spec’d as compatible with the involved versions of Nextcloud. For v29. For v27.
Also, please post your parsed config (occ config:list system).