Sometimes Google will block your access to an account because of some security checks and it will send you notifications to manually confirm your activity.
This is good, but if you want to use an app to automate some tasks for your Google account, you’ll want to disable these security checks.

If you want to give up on Google’s security checks like the one above, you’ll have to follow some steps.
You can directly access this link Google Account Less Secure Apps and just toggle on the option or you can follow the guidelines below.
Step 1 – Accessing Google Account
Login to your google account and access your Google Account page by pressing on your avatar located in the top right of the screen.

Select the Security option from the left side menu.

Step 3 – Finding Less secure app access
Scroll down until you see Less secure app access and toggle it on by pressing on Turn on access.

Toggle it on.

That’s all!