Adding to layer masks: layer masks are great for all kinds of adjustments where you don't want to or can't use the eraser. You can use any value between white and black. The closer to black, the less your adjustment will be visible. (8/8)
Here, I've added a noise filter (filter>noise>add noise). In the layers panel, I can turn the effect off and on (👁️icon) or right click the adjustment icon to edit the effect. Once again, we also get a mask, so we can paint where we want the effect to be. (7/8)
2. Masks
As you can see, the adjustment layer comes with a white mask. White means visible, and black means invisible. If you select the mask and paint it black, the adjustment won't affect the black areas. See examples below: (5/8)