Most people have a superficial understanding of events and do not penetrate the surface to see the underlying realities.
To understand what is really going on in Pakistan one must see it in a broader, world context.
Today, the main contest in the word is between two alliances (1) the US-Europe alliance, and (2) the China-Russia alliance. What is happening in Pakistan today is a proxy struggle between the two world alliances abovementioned.
Pakistan was earlier firmly in the US camp, receiving huge aid from it. Of late, however, China, which is no longer a socialist country ( though it still calls itself one ) has become an expanding imperialism ( as explained in the articles below ) and has inter ailia deeply penetrated the Pakistani economy and Pakistani market
Obviously the American government, which had regarded Pakistan as firmly in its own camp, would be bitterly resenting this economic penetration by China into what it regarded as its home turf.
Former Prime Minister Imran Khan had often been extremely critical of America
He even called the US-Pakistan relationship a ‘master-slave’ relationship, and was critical of Pakistan sending its troops into Afghanistan at the behest of the Americans.
Imran Khan’s visit to Moscow during the Russo-Ukranian conflict further estranged relations.
The result was that the Biden Administration refused to have any contact with him, and practically declared him a persona non grata. If Imran Khan is to be believed, the Americans even tried to put pressure to topple his government.
Thus, Imran Khan is representing the Russo-Chinese alliance in Pakistan.
On the other hand, the Pakistan generals represent the US-European alliance. These generals are beholden to America in several ways, and do its bidding. Their sons/daughters/close relatives have been given high paying jobs in the World Bank, IMF, or some multinational corporation, or admission with scholarship in Harvard, Yale, or some other Ivy League University. Many of the serving/retired generals have huge bank deposits in Western banks.
The proxy contest in Pakistan of the two world alliances, explains what is going on in Pakistan today. Since both the world alliances are powerful, the situation in Pakistan will witness a lot of turmoil and chaos in the days to come, neither side being victorious.