The transgressors will have a tragic end for their actions, but there will be a happy end for the man of peace.
The Psalmist David understood that for the bad people their moment would arrive. David believed in the Lord and in His promises, that everyone who persecuted Him would have their reward. In the same way the righteous will also have a just reward:
Consider the blameless, observe the upright;
a future awaits those who seek peace.
Psalm 37:37
What does a righteous person do, or what can an honest person do? The righteous practices justice with others, the person with integrity is faithful in everything they do, because if is they are faithful to their Lord, how much more with their neighbor.
But all sinners will be destroyed;
there will be no future for the wicked.
Psalm 37:38
What will the Lord do with all those who do evil and who seek to harm the life of the righteous? The Lord will remove them from the way of the righteous, and all their riches will be taken away from them, so that they will no longer have the strength to damage the righteous, they will no longer have silver or gold, because God will take away everything.
The salvation of the righteous comes from the Lord;
he is their stronghold in time of trouble.
Psalm 37:39
Remember that the Psalmist David was a wise man, who found himself in difficult situations, never backed down, but kept going asking the Lord to strengthen him and help him overcome his enemies. God did not leave him alone, the Lord was with him, but above all David knew that salvation was from God and who gave him strength was the Almighty.