Babies are born with protection against certain diseases because antibodies from their mothers were passed to them through the placenta. After birth, breastfed babies get the continued benefits of additional antibodies in breast milk. But in both cases, the protection is temporary.
If you are sick, you may still be able to receive a vaccine, depending on which vaccine you need and the type and severity of your illness.