Today there tends to be a few views on what lust is and how it should be handled.
Moses had it mostly right when saying that you should not have desires for your neighbour's wife, and that you can only have one God.
The general understanding is that as long as you are married it's fine. It used to be that if your partner died you were not allowed to remarry. This was the case in China. This is also correct.
For the most part.
Again, I expect the reader to say "What...?"
If you have the ability to read(divine) past times, why not take a look at 1800s Europe. Many people were married, and because women were not allowed to own property, they had to remarry if their husband died. Everyone should have been fine then.
But oh no. Almost everyone went to hell. Married couples especially. For a long time I could not make sense of this.
But it appears the real issue this hinges on is the "love" or "devotion" a person feels for someone. Humans when born only have one portion of this "love". It's a kind of material, energy. Once invested in the object of your love, it stays there. You can not betray them!
If you love your wife and you get married, then stay with her until death and you never look at anyone else, you will be fine.
But... if you see other women and start feeling love for them, after you already invested all this energy - that is "lust". You have already used up your "love" so a demon will fill in with "lust" and that is what you are investing in the other love interest.
The same issue is handled by the demand to only have one God. You can invest this "love" into a deity and then you are safe from the issue of your wife possibly dying. As long as you stay faithful and place the god first, they will make sure no "lust" is invested in your human relations. The god will give you what you need, in exchange for your devotion to them. But if you start straying from the god, and place even a tiny bit of interest in someone else, you will be cast out. "Lust" will be used instead and you will have made a contract with Hell.