When you light a firework the flame ignites a fuse that goes up into the canister this flame reaches a black powder that combusts and this propels the shell of the firework upwards as it’s flying another fuse slowly Burns at a delayed and steady rate and once it’s
High in the sky the flame reaches the center of the shell setting off the second explosion
source
https://www.youtubepp.com/watch?v=7NmzuMxvEy4