Social media can contribute to depression by fostering unhealthy comparisons, amplifying feelings of inadequacy, and exposing users to a constant stream of idealized content. This can lead to diminished self-esteem and increased feelings of loneliness and dissatisfaction.