This question already has an answer here:
Something confuses me. God is omniscient, meaning He knows everything, including our decisions in life. God says we have free will, but how is that so if I can't make the choice to not do something God knows for a fact that I will do.
If God knows I will do something, I don't have the free will to not do it, meaning I don't have free will at all. So why does He say we have free will?