The First Amendment restricts Congress not the states.
You forget incorporation.
If the states are not restricted by this,then is not the Constitution the Supreme Law of the Land? Maybe I don’t understand how this works, but then again, maybe some judge doesn’t understand it.