What exactly is your issue with this, as a textualist?
>[The Congress shall have Power . . . ] To regulate Commerce with foreign Nations, and among the several States, and with the Indian Tribes; . . .
This is foreign commerce. It falls under the explicit jurisdiction of Congress.
Whether Congress has jurisdiction here is not at issue. The court is deciding a different question, which is whether the ban would violate the first amendment. We look at their ruling:
>We granted certiorari to decide whether the Act, as applied to petitioners, violates the First Amendment.
This is about as much foreign commerce as it is me buying a Xiaomi phone.
I know there's court precedent, but corporations aren't people. It's yet another Chinese platform that Americans use to communicate with other western companies.
Well gosh, that sentence makes it seems like Congress could do anything!
However, this case is about something else. The opinion states that there is a first amendment interest, but that interest is secondary to a compelling national security interest that, in the court’s view, is valid. That may or may not be correct - but it is a subjective interpretation.