I think you might have missed the most important element:
The exact number of “vaccinated” is known, because they track those people once they’ve received the jab
The exact number of “unvaccinated” is unknown because nobody comes in and says “Hi I’m not getting the jab!”
the true rate of hospitalization would be (# of hospitalized)/total number of people, and “total number of people” of “unvaccinated” is greatly underestimated, by factors of ten most likely.
They also know the overall population in any given area so they can deduce the number of unvaccinated: