The Bible says in Genesis that God repented for creating man. But then why does the Bible say "God is not a man to lie, and not a son of man to repent"?
And if God repented, why did Paul said that God prepared the chosen ones to give fruits before the world was made?
The word "repent" means to change direction. In different situations, it can be used in different ways.
"And the LORD was sorry that He had made man on the earth, and He was grieved in His heart. So the LORD said, "I will destroy man whom I have created from the face of the earth, both man and beast, creeping thing and birds of the air, for I am sorry that I have made them"" (Genesis 6:6-7).
The old King James translation used the word "repented" where newer translations use the word "grieved" or "sorry." The Hebrew word is nacham which literally means to breathe strong, like a heavy sigh, and by implication, it means to be sorry. It is an unfortunate choice of wording in the King James Version as it is misleading.
"God is not a man, that He should lie, nor a son of man, that He should repent. Has He said, and will He not do? Or has He spoken, and will He not make it good?" (Numbers 23:19).
The point of the passage is that God doesn't promise to do something and then later changes His mind. He always does as He promised.
I'm not certain what passage you had in mind. There isn't one that reads quite the way you presented it. The closest I could find is:
"Blessed be the God and Father of our Lord Jesus Christ, who has blessed us with every spiritual blessing in the heavenly places in Christ, just as He chose us in Him before the foundation of the world, that we should be holy and without blame before Him in love, having predestined us to adoption as sons by Jesus Christ to Himself, according to the good pleasure of His will, to the praise of the glory of His grace, by which He has made us accepted in the Beloved" (Ephesians 1:3-6).
Many people make assumptions when they read this passage. They see that God chose us and they assume that this means God selected each individual. But Paul didn't say this. Rather, Paul states that the standard of His choosing was according to the good pleasure of His will. In another letter Paul said,
"But we are bound to give thanks to God always for you, brethren beloved by the Lord, because God from the beginning chose you for salvation through sanctification by the Spirit and belief in the truth, to which He called you by our gospel, for the obtaining of the glory of our Lord Jesus Christ" (II Thessalonians 2:13-14).
Notice how Peter speaks of this:
"Grace and peace be multiplied to you in the knowledge of God and of Jesus our Lord, as His divine power has given to us all things that pertain to life and godliness, through the knowledge of Him who called us by glory and virtue, by which have been given to us exceedingly great and precious promises, that through these you may be partakers of the divine nature, having escaped the corruption that is in the world through lust" (II Peter 1:2-4).
God laid out before the world the type of people He would save. He mapped out that salvation in His Word, the will of God, and calls us to Him by that word.
"No one can come to Me unless the Father who sent Me draws him; and I will raise him up at the last day. It is written in the prophets, 'And they shall all be taught by God.' Therefore everyone who has heard and learned from the Father comes to Me" (John 6:44-45).
God predestined how people would be saved and the type of people who would respond. But nowhere does the Bible say that God predestined individual people to be saved or lost. If that were true, there would be no need for judgment because the decision would have been already made. But what we read instead is that we will be judge according to what we do:
"For we must all appear before the judgment seat of Christ, that each one may receive the things done in the body, according to what he has done, whether good or bad" (II Corinthians 5:10).
"But in accordance with your hardness and your impenitent heart you are treasuring up for yourself wrath in the day of wrath and revelation of the righteous judgment of God, who "will render to each one according to his deeds"" (Romans 2:5-6).
Our destiny, according to God, is based on our choices revealed through our actions.