Legislative efforts reflected a national trend of regulating free speech, but also a reckoning with challenges posed by social media and AI.