The First Amendment separation of Church and State was well thought out and comes from the terrors of religious bloodshed in Europe from 1) Cromwell’s puritanical civil wars of the 1640’s to 2) Louis XIV’s edict that any Protestants who did not voluntarily leave the country would be (and were) killed.
All the Founding Fathers read John Locke’s “A Letter Concerning Toleration” which advocated for religious toleration by governments:
https://en.m.wikipedia.org/wiki/A_Letter_Concerning_Toleration