Click on the profile icon in the top right corner.
Click on the "Manage your Google Account" button.
Click on the "Security" tab.
Click on the "2-Step Verification" option.
If you haven't enabled 2-Step Verification, click on the "Get Started" button and follow the instructions.
After enabling 2-Step Verification, click on the "App passwords" option.
Note: if this option not available, you can visit https://myaccount.google.com/apppasswords directly (you must have 2-Step Verification enabled).
Input app name and click on the "Generate" button.
Copy the generated password and save it in a safe place.