Greg Lukianoff (President of FIRE) and Prof. Nadine Strossen (former President of the ACLU) have an excellent post on this subject; here's the beginning, though it's worth reading in its entirety:
Given the recent panic over what Elon Musk buying Twitter may mean for hate speech regulation on the platform, I thought it would be important to explain that arguments for hate speech codes are deeply flawed. As we have previously argued in this series, hate speech laws have proven to backfire in predictable and unpredictable ways. In this and the next entry, we'll be addressing oft-cited arguments that hate speech laws would have prevented historical atrocities.
Assertion: The rise of Hitler and Nazism in Germany is an instructive example of why we should censor hateful and extremist speech.
Greg Lukianoff: Richard Delgado, an early champion of speech codes and now more famous as a founding scholar in the field of Critical Race Theory, cites the Rwandan genocide (more on this in the next entry), along with Weimar Germany, as cautionary tales against free-speech purism. The problem is that neither historical precedent supports the idea that speech restraints could have prevented a genocide.
As I explained in my review of Eric Berkowitz's excellent book, "Dangerous Ideas: A Brief History of Censorship in the West, from the Ancients to Fake News," Weimar Germany had laws banning hateful speech (particularly hateful speech directed at Jews), and top Nazis including Joseph Goebbels, Theodor Fritsch and Julius Streicher actually were sentenced to prison time for violating them. The efforts of the Weimar Republic to suppress the speech of the Nazis are so well known in academic circles that one professor has described the idea that speech restrictions would have stopped the Nazis as "the Weimar Fallacy."