Samuel warned Israel that demanding a king to rule over them was a bad idea, but they wouldn't heed his warning.
God controls the actions of all rulers, whether for good or bad. Kings have no authority or power over God, nor can they resist His will.
After Saul was anointed Israel's first king, and had some early success at defending Israel from its enemies, Samuel further warned Israel of its rebellion and disobedience against God.
Samuel began by rehearsing several times that God had judged Israel for its idolatry and wickedness, but sent deliverers when the people cried out to Him.
In fact, it was the threat of the Ammonite king against Israel that prompted them to ask for a king.
Sadly, Israel didn't seem to remember that it was always God who rescued the nation in the past.
Their demanding a king was simply the latest installment of their rebellion against God, Who was already their King.
But having their own human king would not save them from God's judgment if they continued in their sin. King or no king, Israel would continue to be judged for its sin.
To underscore Israel's latest sin in rejecting God as King and installing a man instead, God sent thunder and rain that day, even though it was harvest season. Samuel told Israel this was to demonstrate their great wickedness in demanding a king to rule over them.
Samuel exhorts Israel to follow after the Lord, and serve Him. Any other pursuit would be after vain things.
Seeking after a king was one such vain thing. It could not profit Israel, it could not save Israel from God's judgment for their sin.
Israel's attempt to escape judgment with a king would fail, Samuel promised them.