1- Set up the IMAP protocol in Gmail on your computer, open Gmail and at the top left of the page click on the settings icon then see all settings
2- Click on the Forwarding and POP/IMAP tab. In the “IMAP Access” section, select Enable IMAP and then click Save Changes
3-Go to https://myaccount.google.com/ And click Security
4- Click on Turn on access and Allow less secure apps: On
5- Add Gmail to Outlook
6- Choose the Google service, then enter your email and password, and it will be activated successfully