To change the PHP version for your domain, seeing you want to change it for different domains, you will need to use the .htaccess file in the directory for the domain by adding the below script:
<FilesMatch ".(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-httpd-alt-phpXX___lsphp
</FilesMatch>
Replace XX with the PHP version you want to use in the directory. You can use any PHP version that is listed in the cPanel PHP Selector. For example, to enable PHP 8.1, you would type SetHandler application/x-httpd-alt-php81___lsphp. (Make sure you do not include the period in the version number. For example, for PHP version 7.4, type 74.)