Since God knows all – past, future and present… then he does not “change His mind” as we know it, but rather – He changes direction according to His original plan which He is just at that moment bringing into fruition.
From the get-go He knew what was to be and He knew that at that moment He was going to pivot towards another purpose. He is never caught by surprise, so never has to “make a course adjustment”.
In His dealings with us limited creations, He reveals things a little at a time… sometimes appearing to us to have “changed”, but the reality is that He is so far ahead of EVERYTHING – that He will never have to say,
I am thankful I am not an “Ooops” of God! He chose me before the creation of the universe! There never has been, nor ever will be – any “ooops” of God.
Related Reading> in two versions
Ephesians 1:3-10 (Version: Amplified Bible)
3 Blessed and worthy of praise be the God and Father of our Lord Jesus Christ, who has blessed us with every spiritual blessing in the heavenly realms in Christ,
4 just as [in His love] He chose us in Christ [actually selected us for Himself as His own] before the foundation of the world, so that we would be holy [that is, consecrated, set apart for Him, purpose-driven] and blameless in His sight.
In love 5 He predestined and lovingly planned for us to be adopted to Himself as [His own] children through Jesus Christ, in accordance with the kind intention and good pleasure of His will— 6 to the praise of His glorious grace and favor, which He so freely bestowed on us in the Beloved [His Son, Jesus Christ].
7 In Him we have redemption [that is, our deliverance and salvation] through His blood, [which paid the penalty for our sin and resulted in] the forgiveness and complete pardon of our sin, in accordance with the riches of His grace 8 which He lavished on us. In all wisdom and understanding [with practical insight] 9 He made known to us the mystery of His will according to His good pleasure, which He purposed in Christ, 10 with regard to the fulfillment of the times [that is, the end of history, the climax of the ages]—to bring all things together in Christ, [both] things in the heavens and things on the earth.
Ephesians 1:3-10 (Version: The Message)
3-6 How blessed is God! And what a blessing he is! He’s the Father of our Master, Jesus Christ, and takes us to the high places of blessing in him. Long before he laid down earth’s foundations, he had us in mind, had settled on us as the focus of his love, to be made whole and holy by his love. Long, long ago he decided to adopt us into his family through Jesus Christ. (What pleasure he took in planning this!) He wanted us to enter into the celebration of his lavish gift-giving by the hand of his beloved Son.
7-10 Because of the sacrifice of the Messiah, his blood poured out on the altar of the Cross, we’re a free people—free of penalties and punishments chalked up by all our misdeeds. And not just barely free, either. Abundantly free! He thought of everything, provided for everything we could possibly need, letting us in on the plans he took such delight in making. He set it all out before us in Christ, a long-range plan in which everything would be brought together and summed up in him, everything in deepest heaven, everything on planet earth.