Previous infection with SARS-CoV-2 (the virus that causes COVID-19) or COVID-19 vaccination can provide immunity and protection from subsequent SARS-CoV-2 infection and illness. CDC used data from the VISION Network* to examine hospitalizations in adults with COVID-19-like illness and compared the odds of receiving a positive SARS-CoV-2 test result, and thus having laboratory-confirmed COVID-19, between unvaccinated patients with a previous SARS-CoV-2 infection occurring 90-179 days before COVID-19-like illness hospitalization, and patients who were fully vaccinated with an mRNA COVID-19 vaccine 90-179 days before hospitalization with no previous documented SARS-CoV-2 infection. Hospitalized adults aged ≥18 years with COVID-19-like illness were included if they had received testing at least twice: once associated with a COVID-19-like illness hospitalization during January-September 2021 and at least once earlier (since February 1, 2020, and ≥14 days before that hospitalization). Among COVID-19-like illness hospitalizations in persons whose previous infection or vaccination occurred 90-179 days earlier, the odds of laboratory-confirmed COVID-19 (adjusted for sociodemographic and health characteristics) among unvaccinated, previously infected adults were higher than the odds among fully vaccinated recipients of an mRNA COVID-19 vaccine with no previous documented infection (adjusted odds ratio [aOR] = 5.49; 95% confidence interval [CI] = 2.75-10.99). These findings suggest that among hospitalized adults with COVID-19-like illness whose previous infection or vaccination occurred 90-179 days earlier, vaccine-induced immunity was more protective than infection-induced immunity against laboratory-confirmed COVID-19. All eligible persons should be vaccinated against COVID-19 as soon as possible, including unvaccinated persons previously infected with SARS-CoV-2.