Meta has agreed to pay up to $18 billion over 10 years to settle a major U.S. legal challenge involving…