There's a problem and solutions with consequences. Every law limits freedom in one way or another. It's a case of how probable and sever is the problem compared to the consequences of the law.
In Germany the problem is Nazis and a choice about how to stop them doing it again. We have seen that such people can convince nearly an entire population (so the problem is likely) and start a world war (so the problem is extreme). Why would anyone debate the need for a law that limits a freedom in a case we consider pretty unworthwhile anyhow (limiting the freedom to deny the holocaust).
As for vaccines it's again a calculation where we know the problem is extreme (huge economic losses and deaths) and the likelihood increases based on how many people don't vaccinate - or whether people in specific jobs don't vaccinate. The calculation shouldn't be that hard.
Pretty sure that 1946 when the country was still full of old Nazi supporters the risk was pretty high. I don't think the risk is that high today, but the laws definitely served a good purpose when they were created.
In Germany the problem is Nazis and a choice about how to stop them doing it again. We have seen that such people can convince nearly an entire population (so the problem is likely) and start a world war (so the problem is extreme). Why would anyone debate the need for a law that limits a freedom in a case we consider pretty unworthwhile anyhow (limiting the freedom to deny the holocaust).
As for vaccines it's again a calculation where we know the problem is extreme (huge economic losses and deaths) and the likelihood increases based on how many people don't vaccinate - or whether people in specific jobs don't vaccinate. The calculation shouldn't be that hard.