He’s jealous in the sense that a man might be jealous of his wife - that is, as far as he’s concerned, she belongs to him and nobody else.
God’s jealous for us. As far as He’s concerned, we belong to Him and nobody else.
Which means He doesn’t want us running after anything else than Him, because He knows that sooner or later it will destroy us.
Envy is different - that’s resentment that we haven’t got something that someone else has. In God’s case it’s all His anyway, so there’s nothing for Him to be envious about. I suspect if anything He gets a bit cynical about people’s claims to ownership - my dog, my boots, my house, my kids, my God.
In the end, when we die, we’ll find out we never owned any of it. It was all a temporary gift, and we’ll be judged on what we did or didn’t do with it, while we had access to it.