A crystal is a stack of mirrors spaced a fraction of a nanometre apart.
X-rays reflect from every layer. The ray from one layer down travels an extra 2d sin θ, and only when that extra path is a whole number of wavelengths do the echoes reinforce:
nλ = 2d sin θ
For λ = 0.154 nm and d = 0.20 nm, the peaks sit at 22.6° and 50.4°. A third order would need sin θ > 1, so it never appears.
Measuring a few angles reveals the hidden spacing of atoms.