I opened the dictionary ("jealous" and "envy") and checked the definitions which each one of them looks correct also for the second word, and I still don't understand what is the difference between them in practical use.
The following in an extract from an interesting piece by M-W about the difference in usage and meaning between jealous and envious in which they state that despite the two terms tend to overlap in usage, there is a difference in the meaning they carry, as explained below:
Some people have a view in this matter that is similar to that expressed by the noted lexicographic scholar, Homer Simpson: “I’m not jealous! I’m envious. Jealousy is when you worry someone will take what you have ... envy is wanting what someone else has.” Others, however, do not make this distinction, or differentiate between these two words in another fashion. Let’s look at some of the ways that jealous and envious overlap.
So while jealous may be used to mean both “covetous” and “possessively suspicious”, envious is only in the first of those two senses. Which of course raises the following question: given that jealous has more meanings than envious, does the word envious feel envious or jealous (or both) of its synonym’s greater semantic breadth?
When used to describe the desire for what someone has, jealous often suggests a stronger emotional intensity than envious. Envious is often used to describe an awareness that what someone else has is desirable. The picture quality of a superior television may be enviable, but it doesn't suggest that someone would be emotionally distraught over not having it. Jealousy has a connotation of frustration bordering on anger.
To be envious is to wish you had something that someone else has. This includes having their whole situation. You can envy someone for their job, their lifestyle, whatever.
"Jealous" is definitely sometimes used with that exact same meaning. You might hear an exchange like:
Person A: "I've got tickets to Hamilton next week."
Person B: "Ooh - I'm jealous!"
In my experience, children know and use the word "jealous" in this way, and don't use "envious." "Envious" is a word you tend to learn as you get older.
However, "jealous" has a larger range of meanings, often fitting in the broad category of wanting to guard what is your own. Very commonly, it refers to being excessively possessive of your partner in a relationship. But you can also find such expressions as "a jealously guarded secret."