Narrated AbuHurayrah: The Prophet ﷺ said: Avoid envy, for envy devours good deeds just as fire devours fuel or (he said) "grass".
Envy is an emotion which can lead us astray from doing good deeds, as it causes us to become jealous of others and their successes instead of focusing on our own goals and achievements. It also leads to feelings of bitterness towards those who are more successful than ourselves, which in turn can lead to negative behaviour such as gossiping or backbiting about them in order to make ourselves feel better. Therefore, by avoiding envy we are able to stay focused on doing good deeds for the sake of Allah SWT without worrying about what other people may think or say about us.
The Prophet Muhammad ﷺ teaches us through this hadith that if we want to be successful in life then we must learn how to control our emotions such as envy and jealousy so that they do not consume us or prevent us from achieving our goals. We must also strive for contentment with whatever Allah SWT has given us so that we are not tempted by worldly desires which could lead us away from His path.