Some software requires older versions of PHP, like PHP 7.4, while some require newer ones, like PHP 8.1. If it happens that you need a specific version, you can switch to it from cPanel.
The below is just an example. Use newer PHP versions.
1. Log in to your cPanel account.
2. In the "Software" section, click on the "MultiPHP Manager" Icon.
3. Scroll down to the bottom of the page, select your domain from the left side of the screen and you will see an option "PHP Version" with a drop-down menu on the right side. Select the appropriate PHP version from it and click the Apply button.
It will take a few seconds and then your PHP version will change to your selected version.