The account of Sodom and Gomorrah is in Genesis 10, 5 chapters before Abraham and the law was not given for many centuries later. So the only sin that they had on their account was Adam's transgression:
[Rom 4:4-9 KJV] 4 Now to him that worketh is the reward not reckoned of grace, but of debt. 5 But to him that worketh not, but believeth on him that justifieth the ungodly, his faith is counted for righteousness. 6 Even as David also describeth the blessedness of the man, unto whom God imputeth righteousness without works, 7 [Saying], Blessed [are] they whose iniquities are forgiven, and whose sins are covered. 8 Blessed [is] the man to whom the Lord will not impute sin. 9 [Cometh] this blessedness then upon the circumcision [only], or upon the uncircumcision also? for we say that faith was reckoned to Abraham for righteousness.
Adam was told that they would die and they did.
However, those who were under the law had a multitude of transgression counted against them:
[Rom 5:20 KJV] 20 Moreover the law entered, that the offence [transgression] might abound. But where sin abounded, grace did much more abound:
So while both Jews and gentiles were sinners, only the Jews were under the Torah so unlike the gentiles they have many transgressions and each transgression carries a sanction. This is in fact why the law, though it was holy, was referred to by Paul as "the power of [Mr.] Sin":
[1Co 15:55-56 KJV] 55 O death, where [is] thy sting? O grave, where [is] thy victory? 56 The sting of death [is] sin; and the strength of sin [is] the law.
But more importantly, Jesus was about to ratify the new covenant by his blood. In "To the Hebrews" the author points out that God will punishes those who refuse the blood of his son:
[Heb 6:4-8 ASV] 4 For as touching those who were once enlightened and tasted of the heavenly gift, and were made partakers of the Holy Spirit, 5 and tasted the good word of God, and the powers of the age to come, 6 and [then] fell away, it is impossible to renew them again unto repentance; seeing they crucify to themselves the Son of God afresh, and put him to an open shame. 7 For the land [Israel] which hath drunk the rain that cometh oft upon it, and bringeth forth herbs meet for them for whose sake it is also tilled, receiveth blessing from God: 8 but if it beareth thorns and thistles, it is rejected and nigh unto a curse; whose end is to be burned.
[Heb 10:26-31 KJV] 26 For if we sin wilfully after that we have received the knowledge of the truth, there remaineth no more sacrifice for sins, 27 But a certain fearful looking for of judgment and fiery indignation, which shall devour the adversaries. 28 He that despised Moses' law died without mercy under two or three witnesses: 29 Of how much sorer punishment, suppose ye, shall he be thought worthy, who hath trodden under foot the Son of God, and hath counted the blood of the covenant, wherewith he was sanctified, an unholy thing, and hath done despite unto the Spirit of grace? 30 For we know him that hath said, Vengeance [belongeth] unto me, I will recompense, saith the Lord. And again, The Lord shall judge his people. 31 [It is] a fearful thing to fall into the hands of the living God.
But even that is not the end of the story because how were Sodom and Gomorrah punished with destruction? By a quick outpouring of eternal fire:
[Luk 17:29 KJV] 29 But the same day that Lot went out of Sodom it rained fire and brimstone from heaven, and destroyed [them] all.
Because the Jews (IE: except for the elect, Rom 9-11) rejected Christ and the new covenant, when the son of man returned in 70AD their city and their nation were destroyed in a siege by Rome:
[Mat 24:15-22 KJV] 15 When ye therefore shall see the abomination of desolation [the Roman army], spoken of by Daniel the prophet, stand in the holy place [Jerusalem], (whoso readeth, let him understand:) 16 Then let them which be in Judaea flee into the mountains: 17 Let him which is on the housetop not come down to take any thing out of his house: 18 Neither let him which is in the field return back to take his clothes. 19 And woe unto them that are with child, and to them that give suck in those days! 20 But pray ye that your flight be not in the winter, neither on the sabbath day: 21 For then shall be great tribulation, such as was not since the beginning of the world to this time, no, nor ever shall be. 22 And except those days should be shortened, there should no flesh be saved: but for the elect's sake those days shall be shortened.
This was what Joel prophesied about the last days:
[Joe 2:1-32 NLT] 1 Sound the alarm in Jerusalem! Raise the battle cry on my holy mountain! Let everyone tremble in fear because the day of the LORD is upon us. 2 It is a day of darkness and gloom, a day of thick clouds and deep blackness. Suddenly, like dawn spreading across the mountains, a great and mighty army appears. Nothing like it has been seen before or will ever be seen again. 3 Fire burns in front of them, and flames follow after them. Ahead of them the land lies as beautiful as the Garden of Eden. Behind them is nothing but desolation; not one thing escapes. 4 They look like horses; they charge forward like warhorses. 5 Look at them as they leap along the mountaintops. Listen to the noise they make--like the rumbling of chariots, like the roar of fire sweeping across a field of stubble, or like a mighty army moving into battle. 6 Fear grips all the people; every face grows pale with terror. 7 The attackers march like warriors and scale city walls like soldiers. Straight forward they march, never breaking rank. 8 They never jostle each other; each moves in exactly the right position. They break through defenses without missing a step. 9 They swarm over the city and run along its walls. They enter all the houses, climbing like thieves through the windows. 10 The earth quakes as they advance, and the heavens tremble. The sun and moon grow dark, and the stars no longer shine. 11 The LORD is at the head of the column. He leads them with a shout. This is his mighty army, and they follow his orders. The day of the LORD is an awesome, terrible thing. Who can possibly survive? 12 That is why the LORD says, "Turn to me now, while there is time. Give me your hearts. Come with fasting, weeping, and mourning. 13 Don't tear your clothing in your grief, but tear your hearts instead." Return to the LORD your God, for he is merciful and compassionate, slow to get angry and filled with unfailing love. He is eager to relent and not punish. 14 Who knows? Perhaps he will give you a reprieve, sending you a blessing instead of this curse. Perhaps you will be able to offer grain and wine to the LORD your God as before. 15 Blow the ram's horn in Jerusalem! Announce a time of fasting; call the people together for a solemn meeting. 16 Gather all the people--the elders, the children, and even the babies. Call the bridegroom from his quarters and the bride from her private room. 17 Let the priests, who minister in the LORD's presence, stand and weep between the entry room to the Temple and the altar. Let them pray, "Spare your people, LORD! Don't let your special possession become an object of mockery. Don't let them become a joke for unbelieving foreigners who say, 'Has the God of Israel left them?'" 18 Then the LORD will pity his people and jealously guard the honor of his land. 19 The LORD will reply, "Look! I am sending you grain and new wine and olive oil, enough to satisfy your needs. You will no longer be an object of mockery among the surrounding nations. 20 I will drive away these armies from the north. I will send them into the parched wastelands. Those in the front will be driven into the Dead Sea, and those at the rear into the Mediterranean. The stench of their rotting bodies will rise over the land." Surely the LORD has done great things! 21 Don't be afraid, my people. Be glad now and rejoice, for the LORD has done great things. 22 Don't be afraid, you animals of the field, for the wilderness pastures will soon be green. The trees will again be filled with fruit; fig trees and grapevines will be loaded down once more. 23 Rejoice, you people of Jerusalem! Rejoice in the LORD your God! For the rain he sends demonstrates his faithfulness. Once more the autumn rains will come, as well as the rains of spring. 24 The threshing floors will again be piled high with grain, and the presses will overflow with new wine and olive oil. 25 The LORD says, "I will give you back what you lost to the swarming locusts, the hopping locusts, the stripping locusts, and the cutting locusts. It was I who sent this great destroying army against you. 26 Once again you will have all the food you want, and you will praise the LORD your God, who does these miracles for you. Never again will my people be disgraced. 27 Then you will know that I am among my people Israel, that I am the LORD your God, and there is no other. Never again will my people be disgraced. 28 "Then, after doing all those things, I will pour out my Spirit upon all people. Your sons and daughters will prophesy. Your old men will dream dreams, and your young men will see visions. 29 In those days I will pour out my Spirit even on servants--men and women alike. 30 And I will cause wonders in the heavens and on the earth--blood and fire and columns of smoke. 31 The sun will become dark, and the moon will turn blood red before that great and terrible day of the LORD arrives. 32 But everyone who calls on the name of the LORD will be saved, for some on Mount Zion in Jerusalem will escape, just as the LORD has said. These will be among the survivors whom the LORD has called.
[Rev 11:8 KJV] 8 And their dead bodies [shall lie] in the street of the great city, which spiritually is called Sodom and Egypt, where also our Lord was crucified.