Perhaps you misread. The First Amendment specifically states that "
Congress shall make no law..." As I previously pointed out the First Amendment's Establishment Clause was not incorporated with the States until Everson v. Board of Education, 330 U.S. 1 (1947), and the Free Exercise Clause would be incorporated with the States by the Supreme Court until Wisconsin v. Jonas Yoder, 406 U.S. 205 (1972).
Before 1947 it was constitutional for States to establish their own religion. Nor was New Hampshire the first State to establish or support a particular religion. Many of the original 13 colonies already had their own established religion before the US Constitution or the Bill of Rights were written. According to Massachusetts Constitution, ratified in 1779, only Christians were granted equal protection under the law, and you could not be Governor of the State without first declaring that you were Christian.
Chapter II, Section I, Article II of the Massachusetts Constitution:
The entire Bill of Rights should have applied to the States immediately upon the ratification of the Fourteenth Amendment in 1867, but the Supreme Court illegally decided to give themselves a new power and selectively decide which parts of the Bill of Rights to incorporate with the States. Which is why it took the Supreme Court until February 2019 (in Timbs v. Indiana, 586 U.S. ___), 152 years, to incorporate the Eighth Amendment and apply it to the States.