This is a reductive and misleading analysis. The US has already prohibited foreign entities from holding broadcast/common carrier licenses, or from owning significant chunks of equity in holders of those licenses [1]. It should be kind of obvious why a country would not want their biggest media providers to be foreign-owned.
You could argue that if the US wants to update the 1934 telecommunications act for the 21st century, it should do so more thoughtfully and comprehensively (I would agree). But the TikTok ban, however poorly written or haphazardly targeted, is fairly in line with a legal doctrine that has been commonly known and accepted for 90 years.
[1]: https://www.fcc.gov/general/foreign-ownership-rules-and-poli...