Are there N consecutive occurrences of a number in a row/column in a matrix?
Husk, 9 bytes

≤▲mLṁgS+T


Takes a 2D array and a number, returns 0 for falsy instances and a positive number for truthy instances.
Try it online!

Explanation

Husk is a functional language, so the program is just a composition of several functions.

≤▲mLṁgS+T
        T  Transpose the array
      S+   and concatenate with original.
           We get a list of the rows and columns of the input array.
    ṁ      Map and concatenate
     g     grouping of equal consecutive elements.
           This gives all consecutive runs on rows and columns.
  mL       Map length over the runs,
 ▲         take the maximum of the results
≤          and see if it's at least the second input.