The operative word in Ex 9:23, 24 is אֵשׂ (esh). BDB provides six basic meanings of this word - see appendix below.
Heavenly fire from God (as is the case here) could easily be seen as "lightening" that causes destructive fire. [One must remember that Hebrew word meanings are very fluid and not so precise as Greek and Latin.] Thus, the various versions have:
- NIV: lightning
- ESV: fire
- BSB: lightening
- NKJV: fire
- NASB: fire
- CSB: lightning
This is clearly destructive fire from God and any of these translations is correct.
The word in Gen 19:24 is the same word, אֵשׂ (esh) used in Ex 9:23, 24, "fire". However, the word used in Ex 20:18 is לַפִּיד (lappid) = "torch" and this is the only occasion it is translated "lightning"; the other 13 times it is translated "torch", eg, Gen 15:17, Judges 7:16, 20, 15:4, 5, Job 12;5, 41:19, Isa 62;1, Eze 1;13, Dan 10:6, Nah 2:4, Zech 12:6.
There is a more specialised hebrew word for Lightning, namely בָּרָק (baraq), eg, Ex 19:16, Deut 32:41, 2 Sam 22;15, Job 20:25, 38:35, Ps 18:14, 11:18, 97:4, 135:7, 144:6, Jer 10:13, 51:16, Eze 1;13, 21:10, 15, 28, Dan 10:6, Nah 2:4, Zech 9:14, etc.
APPENDIX - BDB meanings of אֵשׂ (esh)
1 fire, of conflagration, e.g. in briers, endangering or destroying
crops תֵּצֵא אֵשׁ וּמָֽצְאָה קֹצִים Exodus 22:5; compare Exodus 3:2
הַסְּנֶה בֹּעֵר בָּאֵשׁ (both E); more often of deliberate destruction
by fire, especially שָׂרַף בָּאֵשׁ (בָּ with qam. preton.) object
golden calf Exodus 32:20 (J), other idols Deuteronomy 7:5,25, Asherim
Deuteronomy 12:3, chariots Joshua 11:6,9; 2 Kings 23:1, house Judges
12:1; Judges 14:15, tower Judges 9:52, city-gates Nehemiah 1:3;
Nehemiah 2:3,13,17, city Joshua 6:24; Judges 18:27 compare Isaiah 1:7
+; also שִׁלַּח אֵשׁ בְּ Amos 1:4,7,10 +; שִׁלַּח אֶתהָֿעִיר בָּאֵשׁ Judges 1:8; Judges 20:48 compare 2 Kings 8:12; הִצִּית אֶתהָֿעִיר
בָּאֵשׁ Joshua 8:8,19; Jeremiah 17:27 +, compare Judges 9:49; 2 Samuel
14:30,31 (of field, compare Exodus 22:5 above)
2 of supernatural fire, attending theophany Exodus 3:2; Exodus 19:18
(both J E) Deuteronomy 4:11,12,15,33,36 +; specifically עַמּוּד
(הָ)אֵשׁ Exodus 13:21,22; Exodus 14:24 (all J E) Nehemiah 9:12,19
compare Deuteronomy 1:33 (see מַרְאֵהאֵֿשׁ Numbers 9:15,16 P); of
destructive fire from ׳י Numbers 11:1,2,3 (J) Numbers 26:10 (P)
Leviticus 10:2 (P); compare אֹכֶלָת ׳א in simile of Yahweh's glory
Exodus 24:17 (E) Deuteronomy 4:24; Deuteronomy 9:3; see also 1 Kings
18:24,38; 2 Kings 1:10 (twice in verse); 2 Kings 1:12 (twice in
verse); 2 Kings 1:14; Job 1:16 (perhaps lightning intended), compare
further of lightning Exodus 9:23,24 (JE) Psalm 18:13; Psalm 18:14;
Psalm 148:8 etc.
3 fire for cooking, roasting, parching, etc. צְלִי אֵשׁ roasted at a
fire Exodus 12:8,9 (P) compare Leviticus 2:14; 2Chronicles 35:13;
Isaiah 44:16,19; of tinder for lighting fire Genesis 22:6,7 (E); of
fire for melting (gold for the idolatrous calf) Exodus 32:24; for
refining Jeremiah 6:29, where read with Qr מֵאֵשׁ תַּם עֹפֶרֶת;
compare Malachi 3:2 (simile of purifying work of messenger of cov't).
4 especially of altar-fire Leviticus 1:7 (twice in verse); Leviticus
6:2; Leviticus 6:3; Leviticus 6:5; Leviticus 6:6 +; in offering
incense Leviticus 10:1, also אֵשׁ זָרָה strange fire, i.e. an incense
not commanded, offered presumptuously Leviticus 10:1; Numbers 3:4;
Numbers 26:61; fire from ׳י consuming sacrifice (compare 2) Leviticus
9:24; 2Chronicles 7:1,3; of fire in child-sacrifice (usually הֶעֱבִיר
בֵּן בָּאֵשׁ (לְׅ) 2 Kings 16:3; 2 Kings 21:6; compare 2 Kings 17:17;
2 Kings 23:10; 2Chronicles 33:6; also ׳שׂרף בָּא 2 Kings 17:31, ׳בער
בָּא2Chronicles 28:3.
5 figurative of Yahweh's anger Psalm 89:47 (simile) compare Nahum 1:6;
Lamentations 2:4 אֵשׁעֶֿבְרָתִי Ezekiel 21:36; Ezekiel 22:31; Ezekiel
38:19, אֵשׁקִֿנְאָתִי Ezekiel 36:5; see also Isaiah 66:15; Psalm 79:5;
Psalm 89:47 etc.; of word of ׳י Jeremiah 23:29; figurative of
outbursting emotion Psalm 39:4; of flagrant wickedness Isaiah 9:17,
etc:
6 in various combinations, לַמִּיד אֵשׁ Genesis 15:17 (J) a torch of
fire (compare Di); לַבַּתאֵֿשׁ Exodus 3:2 flame of fire, לַהַב אֵשׁ
Joel 2:5, לַמִּידֵי אֵשׁ (in simile) Daniel 10:6 compare Zechariah
12:6, לַהֲבוֺת אֵשׁ Psalm 29:7 לַהֲבֵי אֵשׁ Isaiah 66:15 compare
לְהָבוֺת ׳א Psalm 105:32, לָהָבָה ׳נֹגַהּ א Isaiah 4:5 compare Hosea
7:6; שְׁבִיב אִשּׁוֺ spark of his fire Job 18:5 compare כִּידוֺדֵי
אֵשׁ Job 41:11; תַּנּוּר אֵשׁ Psalm 21:10 oven of fire, כִּיּוֺר אֵשׁ
Zechariah 12:6; אוֺר אֵשׁ light of fire Psalm 78:14; אֵשׁ לֹהֵט
flaming fire Psalm 104:4; לְשׁוֺן אֵשׁ Isaiah 5:24 tongue of fire,
גַּחֲלֵי אֵשׁ Ezekiel 1:13 coals of fire, so Ezekiel 10:2, compare
רִשְׁמֵּי אֵשׁ Songs 8:6; on אַבְנֵי אֵשׁ Ezekiel 28:14,16 see אֶבֶן;
אֵשׁ דַּת Deuteronomy 33:2, literally fire of a law, or fire was a
law, but דָּת law is Persian & late; read perhaps דֹת[לַמִּ] אֵשׁ
compare Exodus 20:18 or דֶת [יֹקֶ] אֵשׁ compare Isaiah 65:5.