When you cannot stop looking at what others have
A direct instruction about where not to let your eyes settle.
وَلَا تَمُدَّنَّ عَيْنَيْكَ إِلَىٰ مَا مَتَّعْنَا بِهِۦٓ أَزْوَٰجًا مِّنْهُمْ زَهْرَةَ ٱلْحَيَوٰةِ ٱلدُّنْيَا لِنَفْتِنَهُمْ فِيهِ ۚ وَرِزْقُ رَبِّكَ خَيْرٌ وَأَبْقَىٰ
Wa lā tamuddanna ʿaynayka ilā mā mattaʿnā bihi azwājan minhum zahrata-l-ḥayāti-d-dunyā li-naftinahum fīh…
“And do not extend your eyes toward that by which We have given enjoyment to [some] categories of them, [its being but] the splendor of worldly life by which We test them. And the provision of your Lord is better and more enduring.”
The verse says the thing you are envying was given as a test for the person who has it. You are envying someone else's exam paper.
Source
The Qur'an · 20:131
Qur'an
- Qur'anic text in the Uthmani script via Quran.com; translation: Saheeh International