An executive order is just the president telling the employees of the executive branch how to act. An executive order cannot set law. It can impact regulations, which guide how the executive branch interprets the law. That's one view.
The other view is that regulations are themselves laws. In that view, Congress has delegated some lawmaking ability to the executive branch. A president can direct that ability with an executive order.
There are two major judicial views in the United States. In one, the text of the law determines its enforcement. The first paragraph is consistent with that view. This is called textualism. There are variants of this, e.g. originalism (original meaning determines current meaning).
In the other judicial view, laws should be interpreted in pragmatic ways. As such, if the judge considers the Deferred Action for Childhood Arrivals (DACA) program to be good policy, then it must be valid law as well. The second paragraph is consistent with that view. This is called pragmatism or sometimes the living constitution.
There are other judicial philosophies, but these are the main ones in the US. Under textualism, DACA is rather clearly beyond the president's scope. Sure, the president can not prosecute people. But here the president went further and created a new program to institutionalize his decision not to prosecute previous illegal acts and promise that he wouldn't prosecute future illegal acts (e.g. hiring people illegally in the country).
In the pragmatic school, good policy is always legal. So if the judge agrees with the policy, then the judge can just ignore countervailing laws. Laws can't trump policy.
The Supreme Court currently has a textualist majority. So the most likely outcome is that DACA is unconstitutional, and Trump was correct to end it. The only way to pass DACA is legislatively. But of course, one of the textualists might choose to be a pragmatist on the actual day of decision. We won't truly be able to answer the question until the Supreme Court actually rules.