This question is very much related to Help understanding resolution between two light beams which perhaps should be read first?
The first thing to remember is that in general the number of slits in a diffraction grating $N$ is very large so $N\gg 1$.
In the diagram below there are $N+1 \approx N$ slits of which only a few are shown.

For the $m^{\rm th}$ order the basic diffraction grating equation is $m\lambda = d \sin \theta_{\rm m}$ where $d$ is the distance between adjacent slits and the path difference between adjacent slits is $m\lambda$.
In my diagram the path difference between the slit labelled $A$ and that labelled $I$ is $Nm\lambda = IJ$ where $N$ is the number of slits in the grating.
The light from all slits in the grating constructively interfere and this results in a principal maximum in direction $\theta_{\rm m}$.
Now consider a change of direction by $\Delta \theta_{\rm m}$ such that the path difference between the light from slit $A$ and slit $I$ is $Nm\lambda + \lambda$.
This would result in the slits in the bottom half of the grating and the corresponding slits in the top half of the grating, eg slit $E$ and slit $I$, producing waves which are half a wavelength out of phase and so interfere destructively.
This results in the first subsidiary minimum.
The path difference between slit $A$ and slit $I$ could also be could also have been $Nm\lambda - \lambda$ and that would produce the first subsidiary minimum on the other side of the principal maximum.
From the diagram $AJ = D \cos \theta_{\rm m} = Nd \cos \theta_{\rm m}$.
For the triangle with angle $\Delta \theta_{\rm m}$ you have $\lambda = Nd \cos \theta_{\rm m} \:\Delta \theta_{\rm m}$ which then gives the result
$$\cos \theta_{\rm m} \:\Delta \theta_{\rm m} = \Delta (\sin \theta_{\rm m}) = \frac{\lambda}{Nd}$$
Note that this relationship gives the angular half width of a principal maximum.