With node { stage { ... } } each stage will use the same working folder, and all the files in the previous stage will be there for the next stage.
On stage { node { ... } } you have to stash / unstash files between each stage. If you have a large repository, and especially if you have a large dependency folder, such as node_modules , repeated stash / unstash can eventually become significant, or even large, or your build time.
IMO I would usually start with the first syntax, node { stage { ... } } , as preferred. If you have separate build steps that take time and can benefit from concurrency, then switching to stage { node { ... } } might be better if the time obtained from parallelization is not lost during the collection.
Update:
I checked the exact effect of the exchange of attachments on one of our assemblies. with a bunch of steps inside the node, the total build time is just over one minute. With the assembly inside each stage, the total assembly time is almost five minutes. Big difference.

source share