Useful Mac recently posted The Screenshot Spectacular, with all of the shortcuts and variations on taking a screenshot on the Mac. Very comprehensive and clear.
My favorite is ⌘⇧4 for taking a crosshair-bounded screenshot, and then pressing space to switch it to a cursor that captures whatever window is under the cursor when you click, and then (and I didn't know this part before today), ⌥-click to capture the window without the big soft shadow around it.
Anyway, check out the whole post for even more screenshot tips-n-tricks. Thanks to Liz Marley and Joel Page for dropping screenshot knowledge.
Addendum 2017-12-08
Andrew Abernathy mentioned that once you are in window mode, you can hold command ⌘ to target just a sheet attached to a window (instead of the whole window).