Sometimes the question isn’t “how big is this folder” but “how big is it without the stuff you can download again”. du can skip files and folders by pattern.
du -sh --exclude=node_modules --exclude='*.iso' ~/projects
Every file or folder whose name matches the pattern is left out, and for a folder that means everything inside it too. You can repeat --exclude as often as you like. Leaving out a big ISO file or a node_modules folder can make that number a lot smaller.
I find that handy before a backup, to see how much space the real work takes once caches, build output and virtual machine images are gone. It’s also a quick way to check whether an exclude list does what you think: if the number doesn’t drop, the pattern didn’t match.
For a long list, put the patterns in a file, one per line, and use -X:
du -sh -X skip.txt ~/projects
Quote patterns with a star, or the shell expands them first. The pattern is matched against the name and the path du sees, which can be confusing with slashes; plain names like node_modules or *.iso are the predictable ones. And this is GNU du. The du on macOS has -I for a similar job, with different rules.
Further reading: du invocation, GNU coreutils, du(1) manual page