This task can be performed using Procaptcha
Stop Bots, Spam and Fraud
Best product for this task

Procaptcha
oss
Stop threats before they happen. Procaptcha offers robust bot protection without compromising user privacy. Lightweight, open source GDPR compliant bot protection. Switch from reCAPTCHA in minutes.
What to expect from an ideal product
- Efficiently blocks malicious bots before they can cause harm.
- Ensures user privacy by not collecting unnecessary data.
- Provides a lightweight solution that doesn’t slow down your site.
- Complies with GDPR, ensuring your site stays within legal frameworks.
- Easy and quick to switch from other popular solutions like reCAPTCHA.