I add exclusions to Time Machine and then forget which ones stuck. Checking with a command beats opening System Settings and scrolling a list.
tmutil isexcluded ~/Projects/app/node_modules
For each item you give it, tmutil prints [Excluded] or [Included] followed by the path. You can pass several items at once, and -X gives the result as an XML property list for scripts.
It only reports, it changes nothing. To add an exclusion you use tmutil addexclusion. A plain exclusion is sticky and travels with the item when you move or copy it. With -p it is tied to the path instead, and -p needs root and Full Disk Access.
The man page also says tmutil may need access to private application data on the backup disk. If a verb complains, add your terminal app under Full Disk Access in the privacy settings.
It also works on volumes. A volume exclusion is tracked by file system UUID, and the man page says tmutil addexclusion -v is the only supported way to exclude a volume. After setting one, isexcluded on the mount point is a quick way to see whether it took.
Further reading: tmutil man page (ss64 copy)