This answer is mostly a synthesis of years of reading media reports on Afghanistan from the U.S. and foreign press, as well as academic and defense industry specialized journalism, mostly from memory.
China is already, and will continue to be, involved in business ventures in Afghanistan, using the resources available to other private businesses. While it rivals or exceeds the West in its involvement and commitment to select major economic projects in Afghanistan (mostly natural resources exploitation oriented), it probably has fewer actual Chinese personnel on the ground in the country than Western nations do and those personnel are officially, at least, almost all civilians who have worked in cooperation with the U.S. allied forces and the government, less as a matter of principle than out of practicality. Hundreds of Chinese workers in Afghanistan have been killed in the conflict.
But this may very well become increasingly difficult for China to do because the Taliban are resurgent in Afghanistan in advance of U.S. withdrawal. The Taliban are likely to gain more power and to escalate the more than twenty-year old civil war in Afghanistan when the U.S. withdraws. The Taliban were just on the brink of ending that already very long running civil war with their total victory, when the U.S. became involved in Afghanistan's affairs in late 2001 (following the 9-11 attacks, because Osama bin Laden's terrorist organization was based there).
The Taliban has no more love for the authoritarian but officially atheist Chinese government (that is actively persecuting members of its largest Muslim minority), than it does for the imperfectly democratic Western, and Christian influenced government of the United States (which has had an anti-Islamic streak in its political rhetoric and choice of alliances, most recently in the Trump Administration, on and off in recent history). The Taliban seeks a return to a way of life and society that has little use for outside involvement of any kind in Afghanistan.
Realistically, nobody know exactly how this will play out in the coming months, including Chinese leaders, who will have to deal with the evolving military and political power struggle between the Afghan government (which was installed by the U.S. and its allies in a relatively bottom up process that tried to respect Afghan self-determination after the U.S. and the Northern Alliance took control), and the Taliban.
Like most newly formed civilian governmental regimes, the U.S. installed Afghan government has struggled with issues of the competence of its civilian leaders, with corruption issues, with infighting, and with the need to establish its legitimacy on a widespread basis with the ordinary people of the country.
China's main foreign policy concern at this point appears to be to maintain stability so that a transnational conflict that spreads to Muslim minorities in China and Muslim populations in countries near is borders. This goal is currently more of a priority for China than developing a sphere of influence in Afghanistan or making significant profits from its investments there.
There is no indication that China intends to send any significant number of military personnel or any significant amount of military equipment or military aid to Afghanistan, or that it has even seriously considered that option.
Background: A Brief Modern History Of Afghanistan
1973 Military coup removes monarchy established in the 1700s and established Western style democratic political institutions. For about five years, Afghanistan was a relatively peaceful country, that was religiously Muslim, and had cities that were modern, relatively affluent, Western style cities comparable to those in countries like Lebanon, Iran, and Europe.
1978 Military coup installs pro-Soviet regime.
1979-1989 Afghanistan occupied by Soviet military forces, who are resisted in an insurgency that becomes a civil war by Muslim rebels who are covertly backed by the U.S. and other Western powers.
1989-1992 Civil war continues after Soviet military withdraws until the rebels march into Kabul and secure power. From 1979-1992, 2 million Afghans die and 6 million flee the country as refugees.
1992-1996 Rebel forces become divided between moderates and Islamists, giving rise to a Taliban insurgency that seizes control in Kabul in 1996.
The Taliban is an organization favoring a more "Islamist" and conservative religious approach to daily life funded and led (sometimes behind the scenes) mostly by Saudi Arabian and Middle Eastern elites, although not necessarily the Saudi Arabian government or the people holding positions of power within the Saudi Arabian royal family. It has global aspirations and institutionally has established itself at first with a network of Islamic schools.
1996-2001 Taliban forces expand control to most of the country with a small portion of its territory held by a coalition of warlords called the Northern Alliance in a continuing civil war.
2001-2002 The U.S. decisively joins the civil war on behalf of the Northern Alliance, causing the Taliban to collapse and the Northern Alliance to swiftly gain control of almost all of the territory in the country and form an interim government, while Taliban forces regroup in Pakistan. A traditional council forms a transitional new government in 2002 and establishes a new government which is officially an Islamic state.
2003-2005 U.S. and allied military involvement is downgrade from major combat to ongoing counterinsurgency operations, with military action remaining at a low simmer and the new government establishing itself.
2006-2021 The civil war between the U.S. installed government and the Taliban continues to get hotter, with outside military force numbers peaking around 2011. The Afghan government is then given an increasingly large role in the fight as allies gradually step back to a more advisory role. Elections are held several times from the 2002 formation of the government to the present, but the Taliban largely chooses to continue its struggle for control militarily and diplomatically, rather than through the electoral process.
2021 With a firm U.S. withdrawal date announced, Taliban forces make major territorial gains and seem poised to make further strides when U.S. forces have completely withdrawn. At least 600,000 more Afghans (and possibly many more) have fled the country as refugees and about 35,000 Afghan civilians and thousands of local and foreign military personnel have died since the U.S. involvement began in 2001. While the period of 2001-2021 has been almost continually at war, the fighting has not been nearly as intense as it was from 1979-1992 during Soviet occupation.
Overview Of The Situation Today
Afghanistan has been in a constant state of war for all but a few of the last 43 years. Less than 10% of the population can remember a time when their country was not a war zone. No country in the world is currently engaged in a civil war that has lasted as long as the one in Afghanistan. Active moderate scale military operations that seize whole villages and county sized areas, in a matter of days or weeks, are ongoing. The Taliban controls perhaps half the country, disproportionately its rural areas, while the government holds most of the major cities, although the situation changes on a daily and weekly basis.
During Taliban rule and the early years of a U.S. presence, opium production for export was one of the main economic activities other than subsistence farming in the country. The U.S., its allies, and the new Afghan government (more out of loyalty to their military allies than out of moral commitment to the cause), greatly suppressed the opium production industry in the country over time (in part, because it was being used to fund the Taliban), in favor of efforts to restore more conventional economic activity in the country. Both countries in the U.S. led military alliance, and China, have encouraged and supported this transition with efforts including but not limited to direct investment in Afghanistan as part of a broad, not strongly centralized, nation building effort. As the civil war has heated up, some of these economic development efforts have stumbled.
Afghan refugees have disproportionately been the better off, more educated, and more skilled people, although some of the elite in this diaspora returned to Afghanistan seeking to rebuild a new peaceful country in the early 2000s when the future looked brighter (many of them have since left their homeland again). There are still at least 2.5 million Afghan refugees outside the country at this time. This "brain drain" has seriously undermined the ability of Afghanistan to govern itself and for people and businesses in the country to have a private life that is prosperous.
Afghanistan is the poorest country in the world outside of Sub-Saharan Africa with the worst public health situation (e.g. life expectancy, infant mortality, etc.) outside of sub-Saharan Africa (where the worst off countries of Africa are in a situation comparable to that of Afghanistan, and with war torn Yemen running a close second to it).