The reason (in the mythology as the story of exodus is mythological and not historical) for God to harden Pharoah’s heart was to have a reason to do the plagues and all of that, as a show of force to the people of Egypt (and the people of Israel who had been living in Egypt for 400 years and picked up polytheistic tendencies) that Yahweh is greater and more powerful than all of the Gods of Egypt and the Pharaoh.
His hardened heart is mentioned before/during each of the ten plagues. For a few of them it’s as you say, a couple of them actually say he hardened his own heart, but for plagues 6,8,9, and 10 it’s explicitly God that did it. For me that combined with god saying clearly that he would do this, multiple times, before any of it even starts makes it clear that God is responsible for it as part of his plan. He wouldn’t want Pharaoh to just let the people go the first time they ask. What he wants is to make a big show for all of the Egyptians and Israelites that he is the biggest and baddest God and that their Egyptian gods can’t compete.