The road from Xinjiang Autonomous Region leading to the Wahjir Pass on the Chinese-Afghan border: Although the common border between these two countries is only 76 kilometers long, Beijing is anxious that Islamic extremists are pouring into its westernmost region of Xinjiang. It has therefore strengthened its security measures on the narrow border months ago.
China sees the failure of the military intervention in Afghanistan as evidence of the dwindling power of the USA. At the same time, China is pursuing economic interests there. Dealing with the Taliban is characterized by pragmatism - and fear.
See more on this issue: https://edition.cnn.com/2021/08/16/china/china-afghanistan-taliban-mic-intl-hnk/index.html