Exodus 10:1, “Then the Lord said to Moses, ‘Go in to Pharaoh, for I have hardened his heart and the heart of his servants, that I may show these signs of mine among them.'” ESV
Why did God harden Pharaoh’s heart? He wanted to prove to the Egyptians that their gods were worthless. Each plague was against one of their gods.
God wanted to reveal himself to them because someday they will worship him, see Isaiah 19:19-25.
Isaiah 19:21, “And the Lord will make himself known to the Egyptians, and the Egyptians will know the Lord in that day and worship with sacrifice and offering, and they will make vows to the Lord and perform them.” ESV