Occ db:add-missing-indices not possible after upgrade to version 21.0.0

I upgraded Nextcloud to version 21.0.0 and everything worked fine so fare. Except for the fact that I cannot add the missing indices.

Ubuntu 18.04.3
Plesk Obsidian 18.0.33
PHP 7.4.15
Maria DB 10.5.8

After the command the following message appears:

/var/www/vhosts/mydomain.com/mydomain.com$ sudo -u www-data php occ db:add-missing-indices
This version of Nextcloud requires at least PHP 7.3<br/>You are currently running 7.2.24-0ubuntu0.18.04.2. Please update your PHP version.

The curious thing is that the PHP version 7.2.24 is not installed. Does anyone have an idea why this happens?

Sure?

Maybe both versions are installed. 7.2 is default shipped php version.

How did you install 7.4?

The default version by OS vendor is 7.2.10 not 7.2.24. Nextcloud runs under version 7.4.15.

I have installed 7.4 via Plesk updates.