Use the "Select PHP Version" part of your cPanel to change the php version.
You can choose php version in this part:
Also enable or disable modules:
After changing, click "Save".