Google has its own way of doing things. To change your Google Mail account password, follow their instructions: Change password - Google Account. Don't attempt to do that with Mail.
After you change its password, the simplest way to configure Mail to use that new password is to remove that account from Mail, and then add it again:
First remove: Remove email accounts in Mail on Mac - Apple Support
Then add: Add email accounts in Mail on Mac - Apple Support
You will provide the new password when you add that account.
Google won't delete your email messages. They will remain on their server, and Mail will repopulate your Inbox upon adding the account(s) again.