Greetings Vicky, answering your question I truly believe that both options are feasible or could occur and I will explain why.
First of all, we must bear in mind that homosexuality is the attraction or behavior of individuals of the same sex or gender. This behavior or behavior, from my point of view may be due to 2 factors that could be physiological and psychological.
With the physiological factor I mean that there could be a failure in the organism that could determine a deviation in the common behavior of the individual, for this I will give some examples:
1- A baby or fetus during pregnancy must receive a quantity of hormones (Estrogens) provided by the mother. Children develop (thanks to their genetics) estrogen receptors that do not allow the passage of this hormone in cells; while girls develop receptors that allow this step. In this way girls at birth will have the necessary number of female hormones (in addition to those that develop in the future), while the child will develop their male hormones over time, as it grows.
If there is a genetic failure in the sequence that encodes these receptors, the assimilation of hormones can become unbalanced and thus give another behavior to the individual (not necessarily at birth, but if as it develops), this way the " it is born" could be explained.
2- There are other types of physiological faults of the body that can cause this, such as faults in the glands that secrete hormones, faults in the transport of these and others.
Personally, I know an individual with the first case (who has a genetic failure in the production of receptors) and it was not until an adult age that he realized what happened and why his behavior was affected.
Now with the Psychological Factor, it will depend a lot on what is instilled in the infant, who surrounds him, his experiences, and everything that participates in the development of his thought and how he sees the opposite and equal gender.
From situations such as the infant is developed in an environment surrounded by a single gender or sex; who lives with parents of the same sex; what his parents teach him and how to teach him, his positive or negative experiences when interacting with the same sex and the opposite sex, among others.
But wait, does not mean that these circumstances determine that homosexuality is generated, everything will depend on how the child interprets, analyzes and above all how he feels about each circumstance. From here we can say if '' is done '' or not.
You are interested in knowing a little about the first case about the genetic failures of the receptors, and I know that you will do it because you are a scientist. I invite you to research ESR1 or ESR alpha and ESR2 or ESR beta, associated with sexuality.