Thank you for your question.
Temptation is not sin. Temptation to do that which is not right in the sight of God is the common experience of all men and women. If we give in to it, we sin; if we resist it, we do not sin. The process is simple. James states it clearly.
James 1:14 ...every man is tempted, when he is drawn away of his own lust, and enticed. 15 Then when lust hath conceived, it bringeth forth sin: and sin, when it is finished, bringeth forth death.
This was the situation with Jesus Christ.
Hebrews 4:15 For we have not an high priest which cannot be touched with the feeling of our infirmities; but was in all points tempted like as we are, yet without sin.
Matthew 4:3 And when the tempter came to him, he said, If thou be the Son of God, command that these stones be made bread. 4 But he answered and said, It is written, Man shall not live by bread alone, but by every word that proceedeth out of the mouth of God.
Result – No stones made into bread - no sin. It is not the soul that istempted that dies; it is the soul thatsins.
Ezekiel 18:4 Behold, all souls are mine; as the soul of the father, so also the soul of the son is mine: the soul that sinneth, it shall die.
Though tempted as we are, Christ did no sin and did not deserve to die and so God raised him from the dead and gave him eternal life.
Acts 2:24 Whom God hath raised up, having loosed the pains of death: because it was not possible that he should be holden of it.
Back to James
James 1:12 Blessed is the man that endureth temptation (that is without succumbing it): for when he is tried, he shall receive the crown of life, which the Lord hath promised to them that love him.
The problem for all is that, try as we might, we cannot live a perfect life which is why we need our sins forgiven if we would attain to life. This is why baptism into Christ is said to ‘wash away sins’ that are past.
Acts 22:16 And now why tarriest thou? arise, and be baptized, and wash away thy sins, calling on the name of the Lord.
After baptism when we sin through weakness, Christ is our advocate.
1John 1:9 If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness.
The relationship of sins and temptation are also part of the ‘Lord’s prayer’. Sins require forgiveness; temptation is better avoided because of our tendency to sin.
Luke 11:4 And forgive us our sins; for we also forgive every one that is indebted to us. And lead us not into temptation; but deliver us from evil.
I hope this helps