Receiving two doses of the recombinant zoster vaccine (RZV) provides 4 years of protection against herpes zoster (HZ), with varying effectiveness rates over time.