A study that tracked teenagers for a decade found a decline in their wellbeing from time online – but it also provides a critical window for intervention.