The entire immunity process typically takes around 2 weeks after the second dose of vaccine. You can still get infected with COVID-19 and become ill if you're exposed to it shortly after getting your vaccine.
https://www.cdc.gov/coronavirus/2019-ncov/vaccines/fully-vaccinated.html