What role does religion play in the establishment of one’s gender identity ( and that includes “sex” and “sexual orientation”)?

What role does religion play in the establishment of one’s gender identity ( and that includes “sex” and “sexual orientation”)?