This is a slightly vague question as it does not really specify what you want to know. After all, for example, cows are immunized for many things and so that is a relationship between cows and immunization. However, I think that you may be talking about the first immunizations (back in the 1770s) using cowpox to immunize against smallpox.
It had been noticed that people who contracted a disease called cowpox did not catch smallpox. So Edward Jenner deliberately infected people with cowpox (by getting pus from cows that had the disease). This helped protect them against smallpox.
So I would say that this is the most likely answer to your question -- the idea that cows provide the bacteria that were used in the first smallpox vaccine.
From ancient times, there were attempts to prevent contagious diseases, such as smallpox, with a mortality rate of 30%.
At the end of the eighteenth century, when he was the apprentice of a country surgeon in Berkeley, Edward Jenner (1749 - 1823), has noted the followings. The farm milkmaids, who have had the vaccine disease (cow pox, which causes a milder form of the disease), then they was no longer sick of human smallpox.
Jenner called the substance, used for transmission of cow pox, vaccine, after the latin name of this disease (Latin name is vaccine, derived from Latin name Vacca, which means cow).
Jenner called the process, used to protect against smallpox, as vaccination process. Medical world was reluctant at first, to this new process. They subsequently have ended by accepting the method of vaccination. This method has expanded rapidly in Europe, although the cause of the disease was unknown.
In 1857, Louis Pasteur has demonstrated that infectious diseases are caused by microorganisms, which can be grown and studied. He formulated the theory of pathogens in 1864.
In 1876, Robert Koch has discovered Bacillus anthracis and, in 1881, Mycobacterium tuberculosis.
In 1880, Pasteur has proved that, by injecting weakened microorganisms into the body, it can provide protection against infectious diseases.