While it can be discouraging to see people reject the gospel, it should not surprise us. Jesus himself had many who heard him teach, yet walked away unchanged and unresponsive to following him. The apostle Paul testified of men he had poured his life into, who abandoned him later in life to return to the things of this world. Many faithful Christians have shared the gospel, only to see people ultimately reject a new life with Christ.
The Bible tells us that this kind of conviction and response is not genuine. II Cor. 7:10 says that some experience sorrow or grief about their sin, but it isn't motivated out of a genuine desire to turn from it so that they can please God. Instead, many people will initially respond to the gospel for fear of hell and punishment. Not that hell and punishment are bad motivations for salvation. But for many, the thought of hell is quickly gone, and after a few days, they become unconcerned once again with the punishment and wrath that awaits them. They initially say "yes" to Jesus out of fear, but once the fear goes away, it is back to loving the things of this world, which will one day lead to death.
Pharaoh, unfortunately, serves as a good example of this type of sorrow. In Exodus 9, God is continuing to pour out plagues on Egypt because of Pharaoh's rebellion and stubbornness. As the hail storm rains down wrath upon Egypt, Pharaoh begins to cry out and acknowledge his sin. He says, "This time I have sinned; the LORD is in the right, and I am my people are in the wrong. Plead with the LORD, for there has been enough of God's thunder and hail. I will let you go, and you shall stay no longer."
This would seem to be the response that Moses and God had been waiting on all along. But this repentance isn't real. This type of repentance only comes because there is regret due to the punishment. Once the punishment is removed, the sin and rebellion comes right back. Moses even says, "I know that you do not yet fear the LORD God."
Don't be discouraged as you share the gospel and see people ultimately reject it. You can expect this to happen, as we see it happen throughout Scripture, but in the Old and New Testaments. But you can also expect the opposite. Lest we forget, the book of Revelation proclaims a scene where people from the entire earth, a number that no one can count, standing before the throne of God in worship. People will be saved. And we can expect it. As we spread the seed of the gospel, remember much of it will fall on good soil that will spring up and last. As Paul says in I Thessalonians 1:1-5, when the gospel comes in the power of the Holy Spirit, true conviction will happen and we will be able to rejoice over real salvations.