You can use
\vbox\bgroup at the beginning and
\egroup and the end. I don't know about
\NewDocumentEnvironment, but normal LaTeX2e environments don't allow parameters where you have the
\vskip. Here's an example.
Write your answer here.\par
Here is the first exercise.
Here is the second exercise.
Here is the third exercise.
If you compile, you'll see 2 exercises on the first page and one on the second. Each of them is wrapped in a
Of course, there are other packages for writing exercises that may fit your use case without you having to reinvent the wheel. Search TeX SX to find those.