There are important details that need to be gotten right, otherwise the negotiations between Pharoah and Moses wont make sense.
Moses asked Pharoah to allow the people to go into the desert to worship. When Pharoah said no, a plague would come, then Pharoah and his advisors would panic and would agree to let them go if only Moses ended the plague. Then Moses would remove the plague at which point Pharoah's heart was hardened and he attached some conditions so that not everyone could go. Then the next plague hit. So the hardening of the heart happened after the plague was lifted, and the advisors telling Pharoah to agree was when the plague was going on.
But when Pharaoh saw that there was respite, he hardened his heart,
and hearkened not unto them; as the LORD had said.
Note that Moses was asking for less than what God ultimately wanted and God hardened Pharoah's heart so that he would not be willing to grant Moses' insufficient request, and in this way, God achieved what was really wanted (complete freedom from slavery) even though Moses only ever asked for permission to go into the desert and worship.
It was not a binary situation where Moses always asked "let us go" and Pharoah always said "no, you can't go." - regardless of how pop culture portrays the Exodus. Thus Moses could have asked for something completely irrelevant -- a new change of clothes and a free cat -- the point was to get Pharoah to say "no" so that the situation would escalate and the plagues would keep coming until Pharoah became desperate to get the Israelites out of his country.
Thus the purpose of Moses was to be an irritant to Pharoah -- what he actually asked for was irrelevant, the only thing that mattered was that Pharoah would resist and so bring on a new plague.
Note that if God hadn't hardened Pharoah's heart, then Pharoah would have granted Moses' request and let everyone go to worship as Moses asked, but they would have been obligated to return otherwise they would have been lawbreakers. Moses never asked for permanent freedom, he only asked to be allowed to worship in the desert.
It was only after the death of the firstborn that the situation had gotten so out of hand that Pharoah saw Israel as a liability and expelled Israel from Egypt -- that was the ultimate end goal of the various negotiations with Moses and the hardening of the heart.