Do we really have free will?

If God knows what everyone will do in their lives doesn’t that kind of take away free will? And if there’s no free will then why is there still sin?