When scientists are saying “we are not 100% sure” people who have had Covid-19 will have some immunity to reinfection, many smart people I know are hearing “people who have had Covid-19 have no immunity to infection”. Similarly, when scientists say they are not absolutely sure vaccinated people will not spread the virus (although they are quickly changing their tune on this one as they look at the evidence), people are hearing that vaccinated people are spreading the virus. Here is at least one study showing that when people who had a confirmed infection were tested again three months later, protection against reinfection was pretty good but not perfect at about 80%. It appears to have been lower in people over 65 at about 50%.
The CDC and others have also thrown out 3 months as a minimum amount of time they are confident people are protected against reinfection or protected by a vaccine. I think this is just a conservative estimate in the face of limited information, but again the public is hearing “no protection after 3 months”. In this study, they tested again after 6 months and found no decrease in the level of protection (still about 80%).
So my view is that logic suggests being infected would provide at least some protection against reinfection and being able to spread the virus, and the same for vaccination. I say this because this is how other diseases work. And now the data are backing that up. The science and public health policy communication are still pretty bad, and like a toxic spill, bad communication that takes a few hours can take years to clean up on the surface and there will still be puddles of toxic mess for decades whenever you turn over a rock.