Obviously, it depends on details that I do not yet fully understand 100%.
A small excerpt from "Bauwissenonline":
Moisture protection:
"Insulation materials must be especially protected from moisture, as it impairs the insulating effect and can lead to building damage (e.g., mold) in the long term. Protection against moisture from the outside is ensured by the roofing in combination with the underlay.
However, moisture can also occur in the roof structure from water vapor coming from the inside, which can subsequently lead to condensation. Flowing water vapor does not harm diffusion-open insulation materials as long as no condensation forms. To prevent this, a special diffusion-retarding layer (vapor barrier/vapor retarder) is required on the inside of almost every pitched roof structure, which must be tailored to the respective roof construction. In a diffusion-open roof structure, water vapor from the indoor air can diffuse outward through the insulation. With a vapor-tight roof skin without ventilation, a vapor barrier or a moisture-variable vapor retarder must be installed to prevent damage in the insulation layer."
Furthermore, regarding condensation caused by water vapor convection:
"To avoid internal condensation caused by water vapor convection, an intact airtight layer must be ensured. Especially small leaks in diffusion-tight membranes (vapor barriers) can cause severe moisture damage, as significantly more moisture can be transported by water vapor convection than by diffusion."
Ventilation:
Since previously mostly vapor-tight underlays were used, it was common to choose an insulation thickness less than the rafter thickness and thus create a ventilation layer directly above the insulation connected to the outside air. This is referred to as a ventilated roof. This allowed moisture accumulating under the vapor-tight underlay to ventilate out.
As far as I understand correctly, we are dealing with a "ventilated roof structure."
Therefore, a vapor RETARDER as a diffusion-retarding layer must be installed on the inside of the roof structure, or am I mixing something up?