In every flight you take, the wings are filled with highly combustable materials, and yet we find ways to keep them from exploding. The same is true for all those batteries in electric cars, and of course gasoline.
On the other hand, H2 would have exploded just from the spark of lighting the match.
Gasoline also isn't quite as combustible as people imagine.
Gasoline and batteries are heavy and tend to stick to surfaces (including people) when they burn, almost like napalm. Hydrogen rushes upwards, away from people and surfaces, as it burns, and is generally quickly exhausted.
The vapors are different. See both sides of this coin here: https://www.youtube.com/watch?v=DsZOE1nvlhI
Also, this: https://www.youtube.com/watch?v=vln5-HZpgcA
Don't try this at home. Vapors can change things dramatically and horribly. The videos lightly demonstrate this too, but it can be worse.