Please stop me if I’m wrong. Higher vacancy rate is a concern and then implies the income stream is at risk, and hence a higher cap rate.

But when using the formula, based on the coming year income projection,
NOI = gross income (if fully occupied) - op expenses - (vacancy and collection losses)
and
Cap Rate = NOI / Value

I suppose higher vacancy rate <=> higher vacancy loss
Thus, NOI decreases and Cap Rate decreases …
I might make a mistake somewhere but I don’t know where … ?

Why do you think the cap rate is a function of risk? A cap rate is a measure of profitability. A cap rate is observed, not required. It can goes up if (1) NOI grows higher (in % change) than market value of the property, or (2) market value of property decreases further (in % change) than NOI.

This approach is correct, stick to it. As long as NOI correctly counts vancacy and collection losses, the conclusion is right.