Before you can connect a Gmail account to Outlook, you'll need to Prepare your Gmail or Google Workspace (formerly G Suite) account for connecting to Outlook and Microsoft 365 or Office 365 and then Add a Gmail account to Outlook for Windows. Note: The most common reason Outlook will fail to add a Gmail account is a missing or incorrect app password.
To use an app password with Gmail, you have to first turn on two-factor authentication, and then obtain the app password. Once you have an app password, you can use that in combination with your username to connect to Gmail.
Additional information is found in these Microsoft tutorials.