The only certain way to discern the will of God is to observe how events unfold in reality. In any moment, God is free to do as He pleases, despite what any Scripture says.
In the Qur’an, in Sura 13:39, the text reads “God erases or confirms whatever He will, and the source of Scripture is with Him”. There is nothing to prevent God, who is sovereign over all events, from producing a new Scripture which builds upon or potentially replaces a previous revelation. No one who acknowledges the absolute sovereignty of God would deny this.
Among the ways in which people try to understand God’s will are by reading Scripture and hearing the voice of God, but neither of these methods provide total certainty. Even if a Scripture claims to be authoritative within its pages (as both the Bible and the Qur’an do), the freedom of God is not constrained by this. Also, God can speak to people and later contradict what He said, if He chooses to do so.
There are some who believe a particular Scripture is binding, but this is to elevate a Scripture above the free will of God, which I think is unwise. It’s not that God is unable to make promises in Scripture and keep them; of course He can. But the ultimate truth is that God does whatever He pleases – He always has total sovereignty and total freedom.
I have written a book in which I discuss the philosophical and theological implications of understanding the absolute sovereignty of God. The book, titled God’s Grand Game, is currently free as an eBook and available from these retailers.