They may not be Photoshop’s most talked about tools, but are useful for photo-inside-text effects
The Type Mask tool comes in two versions: Horizontal and Vertical. They are hidden under the normal Type tool. Just hold down the mouse button over the icon in the Toolbar to open up the additional options.
Click once in your image to activate the tool. A coloured mask will appear to indicate that the tool is ready to use. Once active, set the size and font within the Options bar, using the flashing cursor to see how large the text will look.
Type a word and see how the text reveals the image underneath. The mask is actually removed. Hit the tick in the Options bar to apply this text.
When you hit apply, the text turns into a selection. To apply this as a mask to a locked Background layer, hold Opt/Alt and double-click over the layer to convert it to an editable one, and then click on the Add layer mask button.
At the moment, the layer pixels are locked with the mask. Click on the chain symbol between them and then use the Move tool to either reposition the text or the image, depending on which thumbnail is selected.