World Wars I and II really amped up the entire world's quest for the ultimate weapon. Machine guns came about in WWII, as did the atomic bomb, of course. Now flamethrowers have been around for centuries.
The Greeks used a derivative of them in the 1st century AD, and Germans developed the flammenwerfer, which was a one-man weapon that shot flames about 25 meters long. Flamethrowers are clunky and heavy and now they are subject to prohibitions from the Convention On Certain Conventional Weapons.
They used them long ago, in a galaxy far, far away
Flamethrower info part II
“They've been around for centuries but aren't used much now.”