To paste content (from the clipboard) into a Layer mask, Option -click (Mac)/ Alt -click (Win) the Layer mask icon on the Layers panel. This shortcut does two things – it targets the mask as well as toggles off the visibility of the mask. Then, choose Edit > Paste to paste into the mask.
Note: if you don’t want to use the shortcut, you can paste into a layer mask by clicking on the mask in the Channels panel and toggling ON the visibility. Choosing Edit > Paste will paste into the mask, displaying the mask as a red overlay.