This law is dumb, because in no way does it prevent the exact same data to be collected, processed by a US entity and then transferred to China.
I suspect that it's not about data being transferred, but the fact that TikTok can shape opinions of Americans... which US companies do a lot, without any oversight.
You suspect that? It is the literal stated reason for it.
It is a separate law from the one passed in April, 2024, which makes what you're talking about illegal: https://www.congress.gov/bill/118th-congress/house-bill/7520