6 if he condemned the cities of Sodom and Gomorrah by burning them to ashes, and made them an example of what is going to happen to the ungodly;

Read 2 Peter 2:6 Using Other Translations

And turning the cities of Sodom and Gomorrha into ashes condemned them with an overthrow, making them an ensample unto those that after should live ungodly;
if by turning the cities of Sodom and Gomorrah to ashes he condemned them to extinction, making them an example of what is going to happen to the ungodly;
Later, God condemned the cities of Sodom and Gomorrah and turned them into heaps of ashes. He made them an example of what will happen to ungodly people.