Answer
The immune response develops over roughly two weeks, so exposure shortly before or after vaccination can still result in illness.
Sources for this answer
- NHSNHS · NHS medicine guidance
General medicine information. Follow the instructions for your own medicine and speak to a pharmacist or clinician about your individual circumstances.