During a contentious hearing, lawmakers demanded that social media companies do better to protect children online.