“How does God know miraculously the future perfectly?”
God is not limited by time and we experimentally have shown over the last 100 years; time is relative. God is outside of time so:
God at the end of time would know historically everything that happened include the free will choices you made and will make? History cannot be change, it happened and everything you did and will do becomes history for God at the end of time. God at the end of time thus provides a perfect history to Himself at the beginning of time, but that in no way would keep you from making autonomous free will choices.
Think about this: If I know perfectly a truly free will choice you made yesterday that choice is fixed and cannot be changed since it is history. The fact I know your free will choice of yesterday, does not keep it from being a free will choice.
History cannot be changed even if God was the only one to know about something that has happened, since it still happened. Since God does everything right perfectly the first time, there is no reason to do it over again.
God is outside of time and omnipresent throughout time, so God at the end of time knows everything historically that has happened throughout time, making it unchangeable (fixed). Yet again just because God at the end of time knows all things that happened throughout time perfectly, does not mean human autonomous free will choice could not have been made.
God’s actions are also fixed and can be called foreordained or predestined.
God at the end of time is the same God existing within Himself at the beginning of time and thus God has historically all the foreknowledge of what happened throughout time, but again that does not mean humans could not have made autonomous free will choices.
God did not present this miraculous method of “how” He knows the future, but that is not unusual while communicating to man from man’s perspective is also God’s way.
There are other ways God can know stuff, but He is outside of time, so He also knows everything historically throughout time?
God is very much interacting with humans, but knows everything that has happened already in the future as pure unchangeable history. It is like God at the end of time sends all human history back to himself at the beginning of time, it is information and not like God is living it twice or constantly.
Jesus knew when He was teaching His disciple, what He would be going through on the cross as pure history, but that does not mean He was on the cross constantly.