While mental illnesses can appear regardless of situation, there are many factors that contribute to the severity (and cause) of a mental illness. This heavily includes the level of violence you are exposed to, your living condition, and whether you face discrimination of some kind.
According to Dr. Ziegler, her top causes of worsening mental health are social media, stress about being more than average, inability to cope with various difficulties, and focusing problems on others.