Set all the setting as to your mail account settings and follow some steps as below mentioned.
Step 1: Navigate to Menu on the main window of the Mozilla Thunderbird email client.
Step 2: Go to your email account, select the Server Settings option on the left panel, and choose the OAuth2 option from the Authentication Method drop-down menu.
Step 3: Restart the Mozilla Thunderbird email client.