2 Chronicles 24:20avar
And the Spirit of God came upon Zechariah the son of Jehoiada the priest, which stood above the people, and said unto them, Thus saith God, Why transgress ye the commandments of the LORD, that ye cannot prosper? because ye have forsaken the LORD, he hath also forsaken you.
Transgressing God's commandments means forsaking God and losing his help.
Nehemiah 1:8maal
Remember, I beseech thee, the word that thou commandedst thy servant Moses, saying, If ye transgress, I will scatter you abroad among the nations:
God warned through Moses that transgression would bring scattering among nations.
Jeremiah 2:20avar
For of old time I have broken thy yoke, and burst thy bands; and thou saidst, I will not transgress; when upon every high hill and under every green tree thou wanderest, playing the harlot.
Israel promised not to transgress, yet turned to other gods.