There are many factors which can affect a person's mental health in either a positive or negative way.
These include:
https://www.mentalhealth.org.uk/explore-mental-health