Let me ask this straight away, would you accept a god, who doesn’t know beforehand everything that happens in the universe he created? Does this idea sound reasonable to you? Like a god who doesn’t know if the people he created will believe in him or not? And if so, what would be the difference between this god and his creatures? And would you be inclined to believe in this god or not?
My answer as well as that of everyone I asked was ‘No, I wouldn’t want or believe in such a god’, and that’s exactly why there’s only One God. He is Allah SWT, the All-Knowing, Who knows everything beforehand. Otherwise, He wouldn’t be the One and Only God!
Now the question becomes: How does Allah know everything beforehand, and at the same time we, as His creatures, have free will? And to answer this question, let me give you an example. Every parent I know, no matter the situation, can tell in advance the reaction of their own kids to different motivators, such as candies, toys, etc.; just because they raised those kids and are close to them, so how about The One Who created us, and is closer to us than our jugular vein?!
Now please differentiate between two facts here. There are indeed things, which you have absolutely no control over, such as your nationality, where you were born or getting hit by a drunken car driver. And there is a time, when you will eventually grow up and have to decide which religion to embrace, if at all. In the former case, there is no free will, but rather mercy and a decree from Allah, whereas, in the latter case, all decisions are purely yours. Similarly, every other decision concerning your education, career, marriage, etc. is yours “unless” something beyond your control takes place.
To help you make the right decisions in your life, Allah SWT has given you two weapons, that of Dua (supplication) and that of Istikhara prayer, where you seek guidance from Allah. And Allah SWT has promised to show you His Straight Path, i.e. the right decisions, if you obey Him and continuously seek His guidance. Nonetheless, He SWT knows in advance exactly what your choices will be, not because you don’t have free will, but rather because He wouldn’t be God if He didn’t!
They will tell you a parent can only predict their kid’s behavior, but they can’t be 100% sure, and I say that’s exactly why we’re creatures and He’s The Creator! That’s exactly why we’re imperfect and He’s Perfect, and that’s exactly why we love Him and worship Him. Because Allah SWT knows us inside out, knows what’s best for us and knows beforehand everything with 100% accuracy!