If you're using Webinoly to install the LEMP stack for you and you want to change the PHP version which installed by the tool, you can use the following Webinoly command:
$ sudo stack -php-ver=7.4
The command above will change the current PHP version installed (let say 8.x) to PHP 7.4 version and all the corresponding stacks that previously depends on PHP 8.x.