The suit alleges that social media companies knew about risks to children and teens but pushed ahead with marketing anyway.