Magento allows a unique server setup that allows each customer to select which version of PHP to use or switch PHP version Magento.
Magento 2 backings these Php adaptations until further notice: PHP 5.6, PHP 7.0, PHP 7.1, PHP 7.2 and PHP 7.3 (for Magento 2.3.3).
To change the PHP rendition in Magento in your facilitating account, follow the means underneath:
Make the most out of the Oversaw PHP form administration. Consequently update your PHP variant to the most recent, consistent, and secure one when accessible.
To execute it, select the Oversaw PHP Form choice and Save. It will add the accompanying controller in your .htaccess document:
AddHandler application/x-httpd-suggested php .php .php5 .php4 .php3
For more info, visit : https://meetanshi.com/blog/switch-php-versions-in-magento/