Conscious beings are aware of their own existence and existence of things that are not part of them. There are two ways of handling consciousness, either it is a physical process in the brain or it is not physical.
If we assume our consciousness is not physical, we still have to deal with the fact, that it is strongly related to the quality of a brain. As we can observe in nature, organisms with less complex brains display simpler behavior. This can be explained as a more complex brain allowing more of the consciousness to appear, similarly to a larger window allowing more light inside. However, non-physical consciousness is in practice undistinguishable from physical one. In both cases, the brain is in the control. It determines the complexity of behavior, it holds memories and both can be changed when the brain is damaged or influenced by chemicals.
The physical explanation for consciousness makes it emerge from processes in the brain. It is an abstraction formed by patterns of signals exchanged between neurons, which are influenced by various chemicals. In this case, the analogy is a computer’s software, which is formed by patterns of signals in the hardware.
In any case, the state of our brain determines our behavior. The state of the brain is determined by our biology and by the environment. The genes are the reason why some organisms have more complex brains than others. The environment then shapes the brain, which gathers information from the environment and learns from it, which involves creating connections between neurons.
Because our behavior is determined only by our genetics and experience, it means we don’t have a free will. If we account for quantum physics, then our behavior is a mix of deterministic causes (genetics and experience) and random events (which could be deterministic as well - while we can’t predict them that does not mean the result would be different, if we restarted the universe), none of which can be considered a free will as is commonly understood.
However, having a completely free will is impossible. It would imply having an ability to make a decision independently from everything, which would include the knowledge of what we are deciding about, because that also influences our decision. It only makes sense to talk about a will free from something specific, like from being influenced by a threat of violence.
The fact that everything we do is determined by our past, may be a problem for some people, because it makes them conclude that life is pointless. Yet there are still others, who do not mind that their life is on rails as long as they get to experience a good ratio of bliss to suffering.