Are there ways to prevent the relaps of croup in children?

Depends. Croup is a common in young children whose airways are rubbery & can make frightful noise with a forcefull cough. Several different viruses are implicated and recurrence over several seasons is common. Spasmotic croup is related to asthma & may recurr more.Your pediatrician should help you sort our your childs pattern so meds can be used if indicated.
Get this checked. Recurrent croup in a child is a red for a possible obstruction and/or anatomic abnormality of the airway. I would see your local pediatric ENT for an evaluation.
Don't get sick. Croup is inflammation and airway spasm in children triggered by a viral infection. Kids can get multiple episodes due to repeat infections with many viruses. It's virtually impossible to prevent getting these illnesses in kids who are exposed to lots of other kids. Some doctors have tried using inhaled steroids to prevent recurrent croup, like asthma, but none of the meds are approved for this use.