In this case, the order bans any US citizen from doing business with ByteDance, and doesn't make a carve out for retaining a US lawyer, which is a violation of due process and means a judge could overturn the order.
If they just added that carve out, it would probably be entirely legally defensible. That one dumb mis-step could mean it gets overturned. This keeps happening with the Trump admin, it's the same reason the DACA repeal was overturned by the supreme court.