Just for context, it's important to consider the entirety of the First Amendment when judging this case, as did the US Supreme Court (see below).
The First does, indeed forbid the Congress from making a law respecting the establishment of religion (it is important to our liberties to prevent the government from establishing a "state religion"), but it also prohibits the Congress from "prohibiting the free exercise" of religion.
Forcing a religious body to abandon its beliefs or principles to conform to incompatible beliefs or principles, to the LGBTQ+∞ agenda, for example, would be the ultimate violation of the First Amendment's recognition that the Congress lacks the authority to prohibit the free exercise of religion.
Sadly, in the Philadelphia case, it is the children who are most hurt by the government intrusion into the church's efforts to help orphans and others who need assistance.
----------
Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances. [Amendment I of the Constitution of the United States; emphasis added]