Step 1: What the question asks.
We need a substance that can put out a fire in places where water is not safe to use, like electrical or oil fires.
Step 2: Why water fails sometimes.
Water conducts electricity, so spraying it on an electrical fire can give a shock. Water is also heavier and can spread burning oil instead of stopping it. So we need a different agent.
Step 3: How a fire is stopped.
Every fire needs three things together: fuel, heat, and oxygen. If we remove any one of them, the fire dies. The easiest one to cut off is oxygen.
Step 4: Check each option.
Hydrogen is itself flammable, so it would feed the fire, not stop it. Sulphur dioxide is toxic and not used for this. Nitrogen does not support burning, but it is not the common choice here.
Step 5: Why carbon dioxide works.
Carbon dioxide ($CO_2$) is heavier than air. When sprayed, it settles over the fire like a blanket and pushes the oxygen away. Without oxygen the fire cannot continue. It also does not conduct electricity, so it is safe for electrical fires.
Step 6: Conclude.
The gas that blankets the fire, cuts off oxygen, and is safe near electricity is carbon dioxide.
\[ \boxed{\text{Carbon dioxide}} \]