A study from the UK's Oxford Internet Institute (OII), which analyzed over 2.4M people globally from 2006-2021, found an 84.9% "positive and statistically significant" correlation between internet access and psychological well-being, compared to a 4.9% negative effect.
The OII, which analyzed people aged 15 and older, also found an 8.5% increase in life satisfaction for those with internet access, though the researchers noted that the results were not causal.
Modern technology, like anything in life, needs to be used properly. What's most important when reviewing the happiest countries in the world is their high levels of wealth. The reason these (mostly Scandinavian) countries are happier is largely due to their robust social welfare and healthcare systems. The digital world should be explored cautiously not cited as the source of either happiness or discontent.