The case is the first major piece of Trump’s agenda to come squarely before the nation’s highest court.