If you understand that the correct way to love God is to love your neighbor, you’ll understand that “sinning greatly against the LORD” means to sin greatly against your neighbor.
Now the men of Sodom were exceedingly wicked sinners against the Lord.
Genesis 13:13 (NASB)
NOW THE MEN OF SODOM WERE WICKED. To their fellow man. This is stated in Ezekiel, viz., neither did she (Sodom) strengthen the hand of the poor and needy (Ezek. 16:49).
Ibn Ezra, Genesis 13:13:1