"Trump should have simply told Carrier that he will apply a tariff on anything they ship into the US."

Trump actually campaigned on that, but it would require tearing up NAFTA to do that, and Trump can't tear up NAFTA by executive order alone.