China has not banned those. Foreign internet companies can operate in China if they obey the same rules that Chinese internet companies have to obey, such as Chinese censorship requirements and requirements to share data with the government.
Most US internet companies aren't willing to meet those requirements, so don't operate there.
If the US wants to ban TikTok it should do the same thing here: make privacy and transparency rules that all social media companies that want to operate in the US must follow.