Most of the times I've seen those ~6 months numbers being quoted, they were lower bounds. We have 6 months of data saying that immunity lasts at least this long.
One reason to expect that immunity might last a long time is that people infected by Sars-Cov-1 still have plenty of antibodies 10 years later.
That said, when it comes to reinfections there is the big problem of variants of the virus. Immunity against one variant might not protect fully against another variant. It's very possible that we'll need to get yearly COVID vaccines, similarly to Influenza. But right now, it's still too soon to worry about that; we're still trying to get everyone vaccinated for the first time.
One reason to expect that immunity might last a long time is that people infected by Sars-Cov-1 still have plenty of antibodies 10 years later.
That said, when it comes to reinfections there is the big problem of variants of the virus. Immunity against one variant might not protect fully against another variant. It's very possible that we'll need to get yearly COVID vaccines, similarly to Influenza. But right now, it's still too soon to worry about that; we're still trying to get everyone vaccinated for the first time.