Policy A: "Any social media platform that refuses to censor opinions the government doesn't like is banned"
Policy B: "Foreign social media platforms are only allowed to operate in our country if our own social media platforms are allowed to operate on the same terms in theirs"
Can you see why Policy A is antidemocratic but Policy B isn't?
One reason why is that Policy B is viewpoint-neutral – the ban has nothing directly to do with what viewpoints the social media platform allows or disallows, it is simply demanding regulatory reciprocity ("We won't ban yours if you don't ban ours"). Whereas, in Policy A, the ban is part of the government trying to control which opinions are allowed to be expressed, which is anti-democratic.
(I haven't heard a clear explanation from the Trump administration of what their reasons for banning TikTok are. It is possible those reasons include Policy B, it is possible those reasons are completely unrelated.)