Lawmakers have accused bothTikTokandMetaof endangering children’s welfare.