Opening statements have been heard as social media platforms go on trial for causing mental health issues.