US social networks are allowed to operate in China, they just have to follow the local law. Facebook was banned after denying the authorities the data of Uighur protesters after a deathly riot in 2009. Imagine the outcry here if a riot that left more than a hundred people dead was organized on facebook, and then the company decides to protect the rioters. Google and Twitter decided that the backlash back home wasn't worth the attempt to enter the market, since they would have to comply with strict censorship laws. Some US social media platforms do operate within China.
TikTok does follow US law, so instead of flat out banning it, the reasonable thing to do would be to enact sensible privacy legislation... But oh wait, then tech giants can't exploit the local population anymore.