If you have to share an account, see if you can set up multiple security keys to reduce hackability.
You shouldn't share passwords, but occasionally there's no option. Some account providers allow you to register multiple security keys to a single account. For example, Google allows this with their Gmail and G Suite accounts. This means that you can share the password to the account among everyone with access, and disable an individual's access without having to change the password (for instance, if a summer student goes back to school and shouldn't have access any more).
For help setting up a security key on your accounts, register for the Protect your accounts from hackers online training.