This question already has an answer here:
I have a raster which I want to cut. A second raster smaller, should be exactly the part where I want to cut the first layer (so I cut the same size as raster 2).
The idea is that raster 2 become the mask for the cut. How can I do this?