need to clear up the misconception here: China is not simply banning US companies.
With social media and internet content products, there is Chinese law "Measures on the Administration of Internet Information Services". Whether one agrees with the provisions in this law is another story. Lets just talk about purely from a commerce perspective. This law is applied equally to everyone, whether it is a Chinese company or US company. If Google, Facebook and anyone else, want to have a specific product operate in Chinese market, that product need to be compliant to local laws. They will be able to operate if they are in accordance to the law. And many US companies do comply with Chinese laws and have products present in China, such as Microsoft (office365, Azure, Bing, Linkedin etc), Amazon(AWS, Amazon.com, Kindle), Airbnb, Apple (Icloud, app store etc). This law concerns with Internet Information services. There are other digital products too. Database services are very much available in China, Oracle DBs has a dominating market share in China. Adobe, Autodesk, etc. Even for Facebook and Google, I believe they have business operations in China. I know Google have ad sales in China, and have significant revenue. By adhering to this law, the internet information product could have significant differences from the product operating in another country, resulting in companies make two versions of the product, one for international, one for china's market. So Bytedance having douying for China and tiktok for international, is not different from Microsoft having Linkedin China and Linkedin international, or Bing China, Bing international, or Amazon.com China or Amazon.com international. From a pure commerce standpoint, this law is non-discriminatory. Whether its company headquartered in China or foreign, anyone have to do the same thing according to the law. It does not provide any advantages for Chinese over foreign companies. Also how do you define what is Chinese/Foregin company? Bytedance is registered in Cayman Islands and 40% is owned by foreign investors. Maybe you could have Chinese nationals running a company in another country and tried to offer a product in China. For running a product in China, both cases is the same, comply to Chinese laws and regulation then the product can operate in China.

The appearance that Chinese companies have advantages over foreign companies comes from a combination of factors: local culture, understanding of the market, much much faster and fierce competition (If speed and competition in international market is 2, in China its 10. For example, Uber left China's market not because of regulatory, regulatory was equal to Didi and uber at the time, but Uber and Didi was locked into extremely heated competition at that time, both sides were pouring money down the drain. It was most likely a business decision. Alibaba's taobao vs Amazon.com, taobao was very competitive and played to the Chinese culture advantage very well. Taobao created 11/11 singles day in 2009 and hit a cord with Chinese people, even becoming a cultural phenomenon). But let say if Google/Facebook funded a team in China to create a targeted product for the Chinese market, they could have a a significant presence in the market.