Queen Victoria and Prince Albert were first cousins, not all of their children were healthy.
It isn't a single marriage that is usually the problem it is when a number of generations intermarry, the gene pool gets smaller and smaller.
Try this to illustrate the problem, get a plate, salt and pepper. Put roughly even amounts of salt and pepper on the plate and mix them up. That's the genetic mix of the first generation child. Take a teaspoon of the mixture out, that's your first child.
Now add more salt and mix in, take a teaspoon of the mix out, then add more salt, and take a teaspoon out, and more, keep going.
Eventually your teaspoon will only contain salt.
There are a few things causing problems. The small gene pool that is getting smaller.
Families used to be able to make a match with a bride of groom in Pakistan who might be as closely related. That is not an option now.
The Muslim faith (or how it is interpreted) teaches that you must not use contraception, and also that having a disabled child is a blessing.