...
Login to Google Account and navigate to Security → Signing in to Google → App passwords
If you don’t have this option “App passwords”, it might be because you have set up not 2-Step Verification for this account. Then you have to set up 2-Step Verification first:
Or there are other reasons, see Googles Help ArticleIn the next step, choose “Mail” as app and “Other” as device:
Then give your app password e.g. the name "Mail Page App" and click generate.
Your App password is now displayed. Please keep it safe, as it will only be displayed once.
Configuring Mail Page App
...