Meta suffered stinging defeats in two separate trials involving child safety that underscore shifting public sentiment toward the social media industry.