1 Samuel 15:29 (Berean Study Bible)
He is not a man, that He should change His mind.
God doesn't repent or change His plans like us. He allows for certain things like sin and Satan to happen. But, He has already prepared for the unexpected and has alternate arrangements in place. Satan's trickery on Adam and Eve may have seen to be a colossal failure on God's part, but Christ the Lamb of God chosen from the foundations of the world was waiting to redeem us. The crucifixion of Christ must have been a momentous yet temporary victory for Satan. But, the atonement plan of God and His resurrection were well underway. God never makes mistakes and hence doesn't have to change His mind like us.