Python Email Error

Guys Please Help me Out!!!

I cannot execute the code to send email through python. I followed each and every step involved in the tutorial but it shows SMTPAuthenticationError:

The issue could be from the login details. Until 2022, we used to use the Less Secure feature. Now we generate an app password via Google Account > App passwords. Replace the generated password with your actual password.

Refer to this guide as well: https://www.youtube.com/watch?v=kTcmbZqNiGw&t=123s