Well, I know garlic is good for the immune system, but from my experience it is best to be including garlic and other immune boosters in your diet regularly. Once you get sick it's a bit tougher to deal with.
One major contributing factor to the spread of the flu is people don't stay home when they are sick. If they did, the rest of us wouldn't likely get exposed.
Even when a family member gets something contagious, there's plenty you can do to stay well. The sick individual must not roam about the house amongst everyone else. They should stay in their bedroom, and yes, have meals brought to them. It is known that our hands are the main avenue to the spread of communicable illness. And of course, we are raised to believe that we're supposed to cover our mouths when we cough. But when was the last time you saw someone cough into their hands, then wash them immediately afterward? Instead, a coughing spell might be followed by reaching for juice, cough drops, etc. Just think of all the items you come in contact with by getting some juice from the fridge. Most of which are frequently handled by others. Being coughed or sneezed on isn't as risky unless you are within about 3-4 feet, if memory serves (I heard the statistic some time ago). That's because water droplets will fall to the floor after a short distance.
I also heard that bank tellers have a very high incidence of illness because they handle money and papers from all sorts of people. People who don't stay home when they are sick. I've watched bank tellers lick their fingers while counting money - brilliant!