You can use following commands to upgrade php from 7.2 to 7.4 on Centos 8:
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf module list php
dnf module reset php
dnf module enable php:remi-7.4
dnf install php php-cli php-common