Generate all square sub-matrices of a given size
05AB1E, 8 bytes

2FεŒsù}ø


Try it online!

Explanation

2F            # 2 times do:
  ε    }      # apply to each element in the input matrix (initially rows)
   Œsù        # get a list of sublists of size input_2
        ø     # transpose (handling columns on the second pass of the loop)