1) Apple has general directions on how to add email accounts in Apple Mail here:
https://support.apple.com/guide/mail/add-email-accounts-mail35803/16.0/mac/14.0
2) You can select the Apple Mail instructions for your specific Mac OS version. Select your Mac OS version on the page to make sure you have the correct directions.
3) Read the directions for adding email accounts.
What follows at this point are more specific directions that work for Mac OS Monterey, Ventura, and Sonoma.
...
8) Once the authentication completes it should ask you for which services you want activated (Email, Calendaring, Notes, etc). Activate the toggles of those services you would like active. Click on the "Done" button to complete the setup.