Unfortunately, Afghanistan has never been friendly to Pakistan from day one. The only time it was friendly was during the Mulla Omar regime. In those 5 years from 1996 to 2001, Indian influence in Afghanistan had waned.
Kabul has all along been friendly to India, and the latter has made use of it to harm Pakistan. RAW and NDS conjointly indulged in massive proxy wars and propaganda war against Pakistan from 2002 onwards. The Indo-Afghan strategic partnership was evolved in 2011 to pose a twin threat to the integrity of Pakistan.
India first turned the non-Pashtun Afghans against Pakistan during the Soviet occupation in the 1980s, and then the Afghan Pashtuns as well as TTP and other anti-Pakistan terror groups during the war on terror.

India has now succeeded in befriending the TTA regime and turning it against Pakistan. The US, the UK and Israel have also been in the game due to the common objective of denuclearizing Pakistan.
Successive Afghan regimes and the people have been friendly with the Pashtuns in Pakistan and with the Baloch people. Whenever there was an insurgency in Baluchistan, the insurgents were given safe havens in Afghanistan and were supported.
The smuggling of dollars, fuel, and food items from Pakistan to Afghanistan and Iran has been a routine. Drug peddling from Afghanistan is another nuisance. These illegal practices were intensified, and terrorism in KP and Baluchistan was resurged after Sept 2021 under a plan. A stage came when Pakistan suffered from dollars, fuel, and food crises. Pakistan had to restart intelligence-based operations in the two conflict zones, which is still continuing. Due to border management and stringent measures, 80% of the racket of smuggling has now been reduced.
With huge stocks of the US NATO armaments and backup support of India, which is training the Afghan Army, Kabul regime myopically considers itself strong enough to confront Pakistan conventionally, which practically is not possible.
The only way out for it is to engage in proxy war and guerrilla war along the border. Its covert operations are being funded by the foreign agencies.
India is carrying out development works, and the US is providing heavy financial aid to Afghanistan. Both have ulterior designs against Pakistan, since the two consider Pakistan responsible for the defeat and ouster of foreign forces from Afghanistan.

All the regimes in Kabul have been supporting the bogey of Pashtunistan. The Pashtuns of the tribal belt, (former FATA) and the Afghans have never accepted the Durand Line as a border, and the latter have laid claims over FATA, KP and the Pashtun belt of Baluchistan.
This common factor and the factor of blood relationship have kept the TTP and TTA bonded together. Both have jointly fought wars against the aggressors and FATA people have been hosts of millions of Afghan refugees in the 1980s and after the occupation of Afghanistan by the Western troops in Nov 2001.
These factors have impelled the current interim regime in Kabul to prefer TTP over Pakistan.
The Afghans have tended to ignore the hard realities that Pakistan never had any territorial claims or disputes, and have always gone out of the way to help them in their hour of need. Afghanistan has been dependent upon hospitals, medications, education, religious training and trade upon Pakistan. But for Pakistan’s wholehearted assistance, Afghanistan couldn’t have achieved freedom from the Soviets in 1989, and from the Western forces in Aug 2021.
Pakistan never exploited the landlock constraint of Kabul and never blocked its trade lifeline passing through Pakistan. It has been hosting well over 3 million Afghan refugees including illegal Afghans since 1979, which has no parallel in recent history.
Afghanistan is still a pariah state and is going through the worst humanitarian crisis but it doesn’t desist from illegal and toxic activities against Pakistan.
The internal harmony in Afghanistan is far from satisfactory. There are frictions among the Qandaharis, Khostis, Panjsheris and the Northern Alliance elements.
The IS-K is a big threat to the current govt in Kabul, and if TTP becomes its ally against the Afghan Taliban, it could endanger the security of the country and the existence of the ruling government.

The TTA doesn’t have effective control over the border regions. These constraints are one of the compelling reasons for the TTA regime to keep TTP pacified and friendly.
Pakistan’s Government has made it clear that Kabul will have to choose between its Islamic brotherly relationship with Pakistan and the Fitna Al Khawarij, who are carrying out daily attacks.
When Kabul refused to rein in TTP terrorists despite repeated requests, Pakistan had to hit the safe havens of TTP across the border. Afghan forces along with the Khwarijs retaliated by intruding across the border in the Kurram and North Waziristan areas on the night of 27/28 December (two days ago), which was summarily repulsed by the Pak forces and inflicted casualties.
All the neighbors of Afghanistan are against cross border terrorism emanating from the Afghan soil, since it is in violation of the 2020 Doha peace agreement.
Only the PTI and some religious parties in Pakistan are pro TTP and pro Afghan Taliban. They have never censured their acts of cross border terrorism. They mourn over the human losses of the Fitnas and their backers, but haven’t shed a tear for the sons of soils who are daily sacrificing their lives for the defence of the motherland.
India and its strategic partners do not want peaceful Afghanistan, since instability and conflict is in their favour. They are using terrorism as a tool to scare away the Chinese working on various projects in CPEC, to scuttle CPEC, to spoil Pakistan-China relations, and to disable Pakistan’s nuclear and missile programs.
A political party in Pakistan is helping them in achieving their agenda by promoting political terrorism, digital terrorism and political instability .
Russia, China, Qatar, UAE and KSA are trying to convince the Haibatullah regime to refrain from supporting cross border terrorism by TTP and IS- K.
Russia, China, the Central Asian States, Iran, and the GCC States will have to play a part in pacifying the interim regime in Kabul by offering incentives, and helping in breaking its isolation, in return for honouring the Doha agreement.
Pakistan and China can help in reining in the TTP and other militant groups based in Afghanistan which are anti-peace.
PTI can help by refraining from its anti-Pakistan and anti-army activities and becoming a useful political party for the overall betterment of Pakistan.