...
You may need to enable 2SV: https://support.google.com/a/answer/9176657 and then use the app password instead of your regular password: https://support.google.com/accounts/answer/185833 .
Less secure apps are stopping for non Google Workspace customers in MAY 2022
https://support.google.com/accounts/answer/6010255
Atlassian Server/DC docs on configuring OAuth 2.0 to receive mail
...