I have been using PHP 7.3 version just because Google Captcha default plugin in Q2A does not work with 7.4 version. But since PHP 7.3 is no longer supported after 6 December 2021, it isn't safe to use 7.3 for the security of the site.
When using captcha on php 7.4, it just keeps giving this error "Please complete the anti-spam verification", even when Google shows a green tick sign next to "I am not a robot" when you click it.