A study of more than 2 million people’s Internet use found no “Smoking gun” for widespread harm to mental health from online activities such as browsing social media and gaming, despite widely claimed concerns that mobile apps can cause depression and anxiety. In their paper, Przybylski and Vuorre studied data on psychological wellbeing from 2.4 million people aged 15 to 89 in 168 countries between 2005 and 2022, which they contrasted with industry data about growth in Internet subscriptions over that time, as well as tracking associations between mental health and Internet adoption in 202 countries from 2000-19. “Our results do not provide evidence supporting the view that the Internet and technologies enabled by it, such as smartphones with Internet access, are actively promoting or harming either wellbeing or mental health globally,” they concluded.

Source: Study finds no “smoking gun” for mental health issues due to Internet usage

I suspect the answer is nuanced and that this deserves more research.