Minecraft wiki entry for TNT, associated text: using a flint and steel or a fire charge
using any item enchanted with Fire Aspect‌[Bedrock Edition only]
a powered redstone current
being shot by a flaming projectile
being shot with an arrow from a bow with flame enchantment.
being shot with an arrow through lava or fire
being hit by a ghast or blaze fireballs.
being hit by a fire charge fired from a dispenser
coming into contact with spreading fire or lava
being in the blast radius of a nearby explosion, including that of another TNT block, a Creeper, a bed, a respawn anchor or an end crystal.
being summoned, in which case detonates immediately‌[Java Edition only] (this can be changed with the Fuse tag)
being fired from a dispenser
being lit by a flint and steel used by a dispenser
being hit by an explosive skull from a Wither
being hit by a lightning bolt.