The best description of the volcanic process of magma with dissolved water vapor and other gases as it nears the Earth's surface is:
Pressure on the molten rock lessens and the gases dissolved in rock can bubble and expand rapidly causing violent eruptions.
As magma rises toward the surface, the decrease in pressure allows dissolved gases (like water vapor, carbon dioxide, and others) to come out of solution, expand, and form bubbles. This rapid expansion can lead to explosive volcanic eruptions.