Medical and biological sense: the body's ability to resist infection, or the process of becoming immune.
Build immunity with a vaccine.
Some diseases give you immunity once you've had them.
being hardened; being unaffected; being accustomed
Figurative extension: so used to criticism, hardship, or a situation that one is no longer bothered by it. Often used with 〜に免疫がある or 〜に免疫ができる.
He is immune to criticism.
I've become accustomed to the noise of the city.
He's already become immune to criticism.
Many people have immunity against this virus.
After working overtime every day, I've become used to the busyness.
You get vaccinated to build up immunity.
Many people have no immunity to this disease.
immunity
immunogen