I think free will is a neurological process that's derived from determinism. The freedom is a combination of pattern recognition and an illusion of choice or control. (Determinism on a cosmic scale + randomness on a quantum scale + unknown neurological process = free will) I usually describe it as an illusion because I think the hubris of humanity can make some people overestimate the amount of control or free will that that they truly have. I don't know if there will ever be a way to accurately quantify the amount control that people really have. But I like to think of our free will as a tiny ripple in an ocean of waves (the waves representing a tiny fraction of events beyond our control).
Life is like an emotional rollercoaster ride on a track of hormones and neurotransmitters. We don't get to choose the ride, but we have the ability to anticipate and make correct predictions about the ride. But ultimately, we are all being done or controlled by uncontrollable planetary and cosmic events, our genetics, our social programming, our microbiome, and the random probabilities of quantum mechanics. For a person to truly have free will they would have to be able to access the multiverse. You would have to be able to make decisions outside of space and time.
That's what I think, but the truth is that no one really knows. It's a debate that scientist and philosophers have been having for centuries. But I don't think it's something that we can truly understand without a better comprehension of physics and the neurological process that leads to what we perceive as consciousness or self-awareness.
If our science, technology, and awareness of the universe continues to evolve (without a civilization ending or extinction level event) I suspect that we will eventually reach a point where two equations will be just as well-known as e = mc2. One will be an equation for M theory or a unification of quantum mechanics and general relativity. And the other will be a basic explanation of the neurological process (biological or artificial) that leads to consciousness. I suspect it is something we will see when or if artificial general intelligence becomes a reality.
I like what Sam Harris has to say about the topic