consistent number of samples for the same experiment

Hi everyone, do we need to “control” the number of samples as consistent in between different groups in a biological experiment?

I am doing research in worms and I am going to present my data by using dot plot. As I want to get 20 individual numbers as one worm each, I prepared at least 25 each group. When collecting data some of the worms were dead give me not the same n for the different group, like n=25 for the control group, n=21 for group 1, n=23 for group 2, n=25 for group 3. n=24 for group 4, n=22 for group 5. It’s possible to analysis the data by one way ANOVA. But do we need to keep the same n for different groups when we collect data? For example, one quantify the first 20 worms each group then make the figure by using 20 individual numbers each group. Is it a MUST or should suggest using all of the data collected no matter the number of n?