What does Psalm 37:1-2 mean?

1 <<A Psalm of David.>> Fret not thyself because of evildoers, neither be thou envious against the workers of iniquity. 2 For they shall soon be cut down like the grass, and wither as the green herb. (Psalm 37:1-2 KJV)

Thomas Scott

Verses 1-2: It is probable that this psalm was written towards the close of David’s life, as the result of his long experience and observation, for the instruction and encouragement of others, who might be called to pass through the trying scenes, such as he had been conversant with. Every other verse, in the original, begins with a letter of the Hebrew alphabet, nearly in regular order: and this arrangement, which, with some variations, is frequently adopted, might be intended as a help to those who desired to commit to memory these sacred poems, for their comfort and benefit in silence and solitude. The Mosaic dispensation engaged peculiar temporal blessings to  the nation of Israel, while they were obedient: yet individuals frequently prospered in wickedness, while the righteous were afflicted and persecuted. This seemed to imply an inconsistency betwixt the word and the providence of God, and formed a great trial to ancient believers. To this difficulty the Psalmist here gives a copious solution, with many excellent cautions and counsels, which at the same time are equally suited, by varying a few expressions, to the case of Christians in this evil world. (Notes, &c. Ps 73:1-28)