Account password in keychain
You don't say what account, however the Mac Keychain.app is designed as a place to safely and securely store usernames and passwords.

It is important to note that the master password for your keychain is the password you use to log into your Mac. So pick a good one and set reasonable timeouts on the screen saver that then automatically locks your Mac. Because if someone has physical access to your Mac and it is unlocked they will have access to everything stored in the keychain.