Omicron, in particular, reinfects people who had non-omicron variants more often than other variants.
Getting COVID doesn’t protect you from getting it again. While a lot of folks believe that catching it does protect you, there is a growing body of evidence that it does not. I recently helped write a peer reviewed analysis in Nature Communications Biology adding to that pile.

You can download the full paper for free here: https://doi.org/10.1038/s42003-023-04687-4
Discussion
You can ALSO catch omicron more than once. 
Even worse, Omicron reinfection occurs over an even shorter time frame. In some cases, only a few weeks!

We were able to get these answers because of the unprecedented level of worldwide scientific collaboration aimed at capturing viral sequences from infected individuals to build a public-facing database. Unfortunately, our ability to measure and quantify the viral spread is evaporating due to decreased funding & ability to continuously sequence patient samples. Better records could also answer more questions.