Can you? Yes.
Should you? Hell no.
In 2022 at least 11 people died and 10,200 were injured by fireworks in the US. That means people are about 930 times more likely to be injured than killed by fireworks. And that kind of injury can be extremely painful.
You'd need high powered fireworks, since party poppers and sparklers aren't going to cut it for this application. Where would you obtain powerful enough fireworks? What kind? How much?
Once you figure out which fireworks to use, how much would it cost? Even a relatively modest fireworks pack can cost hundreds of dollars. It could be a very expensive way to CTB, especially if you do testing which is pretty much mandatory unless you don't mind ending up in the hospital with severe burns and traumatic injuries.
Figuring out how to test would be a difficult engineering challenge. It's hard to know what would kill you instead of maiming and burning you. Destroying your eyeballs is a lot easier than fracturing the skull and causing enough brain damage to kill you. I can't think of anything that would be a good mock-up of a human body, they use crash test dummies in vehicle testing but those cost around $1 million.
People have committed suicide with fireworks, for example a guy held a bunch of firecrackers to his stomach, and it blew open his abdomen so his internal organs were exposed. That was probably not an immediate death and it must have been a excruciating way to go.