The good news is this whole process is relatively painless, so here we go. As always, all the commands assume you have root permissions.
First, install the EPEL and remi repositories.
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
List the PHP versions you have available.
dnf module list php
This should list versions of PHP both in the main repositorys as well as the remi repository. We want to
enable remi-7.4.
Reset the php module (if you already have an existing PHP version installed).
dnf module reset php
Install PHP 7.4.
dnf module enable php:remi-7.4
Update using dnf.
dnf update
PHP 7.4 should now be installed.
Verify PHP version.
php -v
