Low-level judges can rule on whether some low-level executive branch bureaucrat is following the law. But opinions on the constitutionality of a President's actions would need to be done at the full Supreme Court level. A low-level judge might give an opinion, but for his opinion to take effect nationwide, it would have to get SC approval.
Even then, if the SC opinion is out to lunch, the President and Congress need the option of telling the Supremes to go to hell.
You will recall Andrew Jackson’s response to an unfavorable ruling “The Court has made it’s ruling, now let it enforce it.”
He proceeded to ignore it and the Cherokees were screwed out of their lands in Georgia.