And the fact that the US Constitution only allows the Federal Government to regulate interstate commerce is why Wickard v. Filburn was decided for Filburn. Growing wheat to feed your own pigs is obviously not interstate commerce so the Feds can’t tell you what to do.
https://en.wikipedia.org/wiki/Wickard_v._Filburn
Obviously that’s not what actually happened. Equally obviously the constitution constrains the government exactly as much as it wishes to be constrained.
And Congress has delegated part of that power to the President.
The Constitution does not apply if a foreign government "exerts sufficient control over [the enterprise] to make it an agent of the State." I don't know if it can be argued that ByteDance falls in this category, but there have been many allegations that the company works closely with the CCP to provide surveillance and disseminate propaganda on Douyin, the Chinese version of TikTok.