Meta has reached a landmark $US18 billion settlement with 29 US states in a case over the mental harm to children.