"Section 1. All persons born or naturalized in the United States, and subject to the jurisdiction thereof, are citizens of the United States and of the State wherein they reside."
Note the "and subject to the jurisdiction thereof". Trump's argument is that people born in America to tourist parents here for a few weeks (for example) aren't subject to the jurisdiction of America. It's a valid argument to make, even if you come down on a different side. Even the author of the 14th amendment said that was the point of that clause. Even in logical terms it makes sense: You can't just let anyone in to give birth and then collect benefits; it's unsustainable.
However, this case wasn't about citizenship. It was about the broader issue of lower courts issuing restraining orders outside their jurisdictions. It's a recipe for chaos. There's a reason why there are multiple jurisdictions, and courts are limited to their jurisdictions. What happens when two lower courts issue conflicting nationwide orders? The only court in the US that has jurisdiction over the entire country is the Supreme Court. This was a losing battle.
There's a right way and a wrong way to go about addressing problems. Court cases are sometimes more about the core issues involved than the concrete circumstances. Sure, birthright citizenship was the reason for the suit, but the core issue was judicial overreach. Don't get mad because the way your side was "winning" was by cheating, and they were stopped. Try having an actual good argument, and doing things the right way by arguing the actual case in a court.