Moving to php version higher than 7.0 is hardly made on purpose. More often it’s done by app that doesn’t handle properly php versions.
Unless you tried specific branches of nextcloud to update to the version 16 or 17, there’s no reason for nextcloud to install any specific version of php.
You probably had install an app at a time.
If you do remember of one you did install recently, it may be interesting to know.
Meanwhile, what gives you ls -l /etc/php/
and update-alternatives --display php
?
I think sudo update-alternatives --config php7.0
may be more efficient than just php
did you try ?
EDIT: Furthermore, no app listed in YunoHost use the version 7.4 of php. Which isn’t even available for Debian yet.
So I wonder how did you end up with this version…