Some folders are huge, rebuildable and pointless to back up. Package folders are the classic case.
tmutil addexclusion tells Time Machine to skip an item.
tmutil addexclusion ~/projects/site/node_modules
tmutil isexcluded ~/projects/site/node_modules
The second command reports [Excluded] or [Included], so you can check your work. By default the exclusion is sticky: it follows the file or directory when you move it. With -p you get a fixed-path exclusion, which applies to a location instead and takes effect again when something new appears at that path.
tmutil addexclusion -p ~/projects/site/node_modules
I prefer -p for folders that get deleted and recreated by a build tool. Adding it once means it keeps working after the folder is recreated.
The caveat is simple. Excluded means not backed up, so you cannot restore it from Time Machine. Only exclude what you can rebuild.
Time Machine is a safety net, not a copy of everything on earth. A few excluded folders can make each backup run noticeably lighter.
Further reading: tmutil.8 man page, On this site: mdls -name kMDItemWhereFroms tells you where a download came from, On this site: qlmanage -p opens Quick Look from the terminal