Often, when a mother dog kills her puppies like that, the others are at risk.
She should be spayed if she has this tendency although some mother dogs may kill pups for some instinctive reasons such as sensing that there is something wrong with them or due to stress or simply being too young.