Which of the following practices ensures that a young animal has resistance against diseases?