IK didn't do it. Nawaz publicly humiliated them.
NS era ties aren't relevant to the latest spats, earlier on during this current government we had great relations. IK's original visit to Saudi was successful, we received Saudi deposits in SBP, deferred payments on crude imports, Saudi FDI pledges, as well as some efforts by them to get IK in with Trump via Jared Kushner, IK even took MBS's own private jet on his trip to Washington, we also had some very friendly remarks made both publicly and privately by MBS at that time.
What followed were multiple blunders and mistakes from our side, IK out of the blue made comments indicating that he would like to mediate between Saudi and Iran.
This idea is pretty absurd on the face of it, how could we mediate when we have little to no influence or leverage over either Saudi, let alone Iran? Who were we, then asking every third country for bailouts, to mediate the biggest conflict in the Middle East, unilaterally? All while Saudi was actually quite content with the status quo with Iran and following Trump administration pressure on Iran via revocation of the JCPOA. Iran also sees us as unreliable, with a track record of easily caving to US and Saudi interests. How would we mediate from their perspective while bankrolled by Saudi and the GCC? IK's comments made it seem like we were perhaps asked to mediate -- plainly, we weren't asked by anyone.
Anyway, that wasn't well received by the Saudis. Then IK publicly signalled closeness to Turkey and Malaysia, he talked about making media outlets and TV channels to create a new Islamic narrative of sorts. It's not hard to see why this caused Saudis further alarm, TV channels are a big deal, just look at where Al Jazeera started and where it is now, it's a pertinent example here for more than one reason, I'll let you infer as to how. Then IK said he'd go to the KL conference, which was seen by some as a possible challenge to Saudi leadership. He again upset the Saudis, but this time they conveyed their discontent, and IK bowed to the pressure, causing himself and the state of Pakistan embarrassment, as well as further damaging ties. And last of all came SMQ's hotheaded and deeply stupid comments on live TV issuing scathing attacks on the OIC. You attack your allies and your creditors at your own peril, especially when you have no leverage or power, and all to lose.
So that's the whole story. Now finally those relations are being repaired, the army chief himself has led this effort.