This presupposes that marriage is a strictly religious tradition - which is false. Marriage as a concept exists across many cultures sometimes as a religious tradition and sometimes as a civil one or as a swearing of personal oaths.
It is also not strictly a thing that all religions abhor same sex unions or do not have traditional same sex marriage as a thing. There are a number of Indigenous religions across the world which have gay marriage as a feature, new religions can factor them in as valid or existing religious sects can change. Bans on gay marriage force the state to adopt the traditional Christian stance on marriage at the exclusion of other religions and cultural traditions... While also denying a number of functions at a civil level such as spousal benefits, rights regarding legal decisions, visitation rights in hospitals and so on.
Something to consider on two fronts.
Also your concerns are not new. They are also not unstudied. It has been studied extensively. Science has found there is no meaningful difference between the outcomes of being raised by a same-sex couple as a mixed sex couple. They measured their rubric across a number of success variables across physical wellbeing, mental and emotional health, acedemic outcomes and so on. Basically if you are raised by adults who show affection, are responsible and committed to the wellbeing of the child it doesn't really matter what their sex is. At some point trusting a body of science is nessisary over one's gut feelings or supposition.
Here's a study with an approachable abstract to get you started.
https://pmc.ncbi.nlm.nih.gov/articles/PMC4091994/