To upgrade/downgrade PHP version, log in to your cPanel and visit the "Select PHP Version" menu:
Then you can select which PHP version for your cPanel.
Note for upgrading to PHP 7.4:
Remember to backup your WP site first before upgrading. If after upgrading you see some WP code errors, it's better to move back to PHP 7.2 from cPanel => Select PHP Version menu.
Currently only few WP official plugins support PHP 7.4, like Yoast SEO, JetPack, etc. Most commercial plugins found on JVZoo, CodeCanyon, etc only supports PHP 7.2 because developers' target is to migrate from PHP 7.2 to PHP 8 right away instead to PHP 7.4.