LaTeX: NewDocumentCommand

The second thing is that \newcommand macros are not ‘robust’. This shows up where you need to \protect things, which can be very confusing. Macros created with \NewDocumentCommand are robust, and this means that they work more reliably.

https://www.texdev.net/2010/05/23/from-newcommand-to-newdocumentcommand/