Gas can come from chemistry or biology
Baking soda/powder release carbon dioxide through reactions; yeast produces gas through metabolism.
Steam also expands
Water vapour contributes to lift in some foods.
Structure has to set
Proteins and starches help preserve the expanded form.
Timing matters scientifically
Gas production, viscosity and heat-driven setting need to overlap.
This page explains scientific concepts for general learning. It does not replace laboratory safety procedures, professional engineering guidance, or individualized medical advice.