If you need to run different PHP versions in different directory on your Apache server, you can do this with .htaccess
Example:
PHP 8.0
public_html/php80/.htaccess :
AddHandler application/x-httpd-php80 .php
PHP 7.4
public_html/php74/.htaccess :
AddHandler application/x-httpd-php74 .php