thanks for writing to health care magic.
A balanced diet and vaccination
is what is required to prevent recurrent infections.
One should also see that proper hand wash is done.
In fact there is no way to see that a child does not get any infection at all.
Only through recurrent infections we get immunity to the viruses and bacteria.
Do not worry. Infections do occur in children. Early identification and treatment of problems is important.
Hope this helps.