As'salaamu alaikum,
There are two kinds of jealousy. One of them is good and one of them is bad. When someone looks at your women and that makes you jealous, that is good jealously because you are looking out for your kin.
Jealousy is part of human nature, even the prophet's (saws) wives were jealous of each other. But with all things, there's right way and wrong way to go about it. Many jealous people harm others today, even do sihr on each other so easily out of jealousy. These people are only making their place in hellfire by engaging in such a major sin (sihr).
We should not let shaytan get the best of us. You are not a true believer until you love for your brother (sister) what you love for yourself. So how can we be jealous of others? When we see something someone has that we would like, we should first say mashallah for them that Allah blessed them with it and then also we should say inshallah for ourselves so that Allah may bless us one day with the same as well. Do you think Allah will give you if you are jealous of someone because Allah gave it to them or do you think Allah will give you if you praise Allah in a the best manner instead.
As for what we get and what we don't get. It works like this...
There are things that are written for us to be in our naseeb. And then there are outside forces (like sihr and evil eye) that can change these things written in our fate. Jealousy can give evil eye and it can even lead some to go do sihr on you. So we must always recite our duas and read surahs like falaq, nas, ikhlas and ayatul kursi to protect ourselves.
Our duas fall into 3 categories. First one is that our dua is accepted right away, 2nd is that it is accepted by postponed to a later time to be given us. 3rd is that our dua is not accepted but Allah will compensate us for it on J-day. When you see the amount of reward Allah gives us for not accepting the dua, you will wish none of your duas were accepted.