Ideally you have to "dig deeper" and remove the trim and bend the housewrap behind it. More or less the housewrap should be touching plywood/OSB/CDX or framing lumber. The housewrap is a barrier for the framing and sheathing, the trim has to face the weather.
I have a similar setup with vinyl siding applied directly to OSB on my existing garage, I didn't build the original construction but discovered this when raising the garage door header in the wall, as I stripped things back.
I had stained and slightly rotten OSB on one upper corner of the upper garage door, this is 17 years after the original build. However that was caused by the horizontal J-channel of the vinyl siding, on top of the garage door (rollup door) opening having no "tabs" bent down over top of the vertical J-channel. There was basically a 3/16" gap at the transition and water ran merrily down behind the vinyl every time it rained. The siding guys must have missed that day in siding school.
For now I siliconed this up to keep the new sheet of OSB dry, but shortly, it will be an interior wall and the transition will be moved to another spot.