Social media giant Meta agreed to pay as much as $18 billion and institute sweeping changes to how children can use its apps in a landmark nationwidesettlement that aims to broadly shift how young people use social media across a range of companies and apps.