Jesus was a man in a human body who was tempted in every way as we are.
That doesn’t mean He sinned in it, but *saints* do not, not have a flesh and normal human desires.
Temptation is not sin.
Engaging in it or giving in to it, is.
I do not recall Jesus every being tempted. the devil tried to tempt Him power but failed. Jesus was not tempted to take his offering of power. I do not believe there was any temptation on his part even in his heart, which He considered a sin.
And yet...
Matthew 5:28 English Standard Version
But I say to you that everyone who looks at a woman with lustful intent has already committed adultery with her in his heart.