Is this legal?
Sorry, in all seriousness though, I'm sure there's a legal pathway for any action the gov't wishes to take here [1].
[1] https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2203713
That said, I (not a lawyer) think it depends on how they do it. If they can compel Apple and Google to remove TikTok from the app stores (which I think they could with help from Congress), that would likely be enough to kill TikTok in the US.