This study aimed to assess the real-world effectiveness of vaccines and hybrid immunity in preventing infections during the Omicron prevalent period in Hong Kong. This study analyzed vaccination records and COVID-19 confirmed case records from 1 January 2022 to 28 January 2023 and included a total of 7,165,862 individuals with vaccination or infection records. This study found that an additional vaccine dose offered increased protection against Omicron BA.1/2 and BA.4 infections for individuals without prior infections in general. Hybrid immunity, acquired through vaccination and natural infection, was found to be significantly stronger than that provided by vaccines alone. The Comirnaty Original/Omicron BA.4/5 bivalent vaccine, introduced in December 2022, was associated with a lower risk of BA.4 infection when administered as a booster dose after three doses of CoronaVac. However, individuals with four doses of the CoronaVac vaccine did not exhibit a significantly lower risk of infection compared to those with three doses during the BA.4 dominant period. This study highlights the importance of promoting booster shot uptake and encouraging vaccination among those who have recovered from COVID-19 infections. The potential immune imprinting effect associated with the Comirnaty and CoronaVac vaccine underscores the need for continued surveillance and research to optimize vaccination strategies for emerging variants.