A historic lawsuit challenging the design of popular social media platforms is unfolding in a US courtroom.