Our past 75 years' history is a reflection of a fierce fight of a nation for its survival. We have been dealing with challenges since our birth as a independent nation in 1947. No doubt, we have made many mistakes (calling them blunders might be more appropriate) and as result we worsened our challenges. But all that mess that we find ourselves in is/was not the result of merely our mistakes. Briefly talking of our blunders, one can point at many factors (dominance of our political landscape by feudal lords, corrupt military leaders, linguistic fractures and under-currents, etc.) but, to my understanding, all those rogue factors can be described as a lack of nation-building process. We utterly failed in nation building especially during the extremely crucial first decade of our independence. Leaving all that on one side, what I want to emphasize here is that external factors too turned out extremely detrimental to the struggle for our national existence. For example, right after we got independence in 1947, Afghanistan, our western neighbor, waged a diplomatic war against us (on behalf of certain global/regional powers - namely USSR and India) besides trying active aggression against Pakistan on multiple occasions. But it didn't stop there. Afghanistan started acting as a spring board for launching insurgences (aka terrorism in current times) in KPK (then NWFP) and Balochistan by the hostile powers. Indians launched a similar separatist campaign in the former East Pakistan and finally broke it (with the active help of Soviets) to give birth to the current Bangladesh.
Post 1971, a new phase of global great game started appearing with the USSR defeating and actively chasing USA and Nato at many places (e.g. Eastern Europe, Africa, Middle East, Iran, etc.) while latter powers desperately retreated globally. The Soviets, after getting emboldened and enough confident by all their successful strategic advances, launched their most crucial aggression (i.e. the occupation of Afghanistan) in December 1979. That posed an existential threat to Pakistan. Of course, neither the people of Afghanistan nor Pakistan really invited Soviets in this region. It was a patient and very calculated move by the Soviets towards achieving their generational strategic goal of having an access to warm waters and control over the Strait of Hormuz.
Since Soviets had been using terrorism against (i.e. insurgencies in) Pakistan for long by then, they started hammering our country with frequent terrorist bombings, insurgent attacks, and diplomatic coarsening with much more intensity. That was , of course, not our choice. All that was imposed on us. Regardless, we stood up against Soviet aggression in Afghanistan or accepted it and tried to appease them, the writing was on the wall - the next logical target of Soviet invasion was Pakistan's Balochistan province. This nation chose to resist Soviet advance and fight against them in Afghanistan. Yes, this course of action brought the curse of narco and gun culture but that was the price that we had to pay for our national freedom.
Soviets left Afghanistan and, only less than two decades after that, Americans came in and occupied Afghanistan, again with big plans of dismantling Pakistan into pieces. They used terrorism (with the help of Indians as usual) even at much larger scale against the people of Pakistan. We were kept bleeding a good part of the subsequent two decades with tens of thousands of Pakistanis losing their life.
All these factors were not of our doing. How many wars were imposed on us by global powers (USSR, USA, etc.) and India on this poor country? We had a very soft border with Afghanistan with no border controls at almost the whole Pak-Afghan border with many Pakistani areas near it enjoying semi-autonomous status. All that was exploited by the enemies of Pakistan to turn FATA into the hub of terrorism for launching deadly terrorist attacks against the innocent people of Pakistan.
Yes, we have made so many mistakes but we have been struggling for our survival during all that time. We simply could not really focus of nation building process. We were able to make tanks, fighter planes, missiles, and nukes. But all that made us something even more hateful for the world powers. Remember, we were once a role model for third world countries in 1960s and delegations used to come to Pakistan from South Korea, China, and other countries for studying our economic development plans and strategy. It is believed that the world powers then realized the dangers of a strong, prosperous, and powerful Islamic country (created in the name of Islam) and decided to cut it down in late sixties and early seventies. Yes, our policy makers were/are short-sighted too but a systematic decay and erosion in our national independence is probably not merely of our own make.
The last five years have proved to be the most devastating for us. IK government took more loans than any single previous government. He ran the country on virtually a ponzi scheme (that is, borrowing more money to return the installments of previously borrowed money). IK had a chance due to Corona. So many export orders were diverted to Pakistan from India, Bangladesh, and other countries (where Corona took a large toll). It was the time we could reduce imports, promote exports, and return loans (or at least minimized the dependence on those loans). Unfortunately IK took more loans than in past. And then he virtually broke the agreement with IMF by foolishly and shamelessly turning rogue on the measures that he agreed with the IMF. We are currently paying the price of that stupidity. While I am sure we will weather it out successfully but the poor in Pakistan will be crushed in that process.