Sin is the disobeying of God’s commandments.
1 John 3:4 Whoever commits sin also commits lawlessness, and sin is lawlessness.
Was Jesus capable of disobeying God’s commandments? The answer is Yes – he bore our nature and was tempted exactly as we are:
Hebrews 2:18 For in that He Himself has suffered, being tempted, He is able to aid those who are tempted.
Hebrews 4:15 For we do not have a High Priest who cannot sympathize with our weaknesses, but was in all points tempted as we are, yet without sin.
Did Jesus disobey God’s commandments? - Did he commit sin? The answer is No – he did not sin:
John 8:46 "Which of you convicts Me of sin? And if I tell the truth, why do you not believe Me?
1 Peter 2:22 "Who committed no sin, Nor was deceit found in His mouth"
1 John 3:5 And ye know that he was manifested to take away our sins; and in him is no sin.
He did not earn death by sin, therefore God raised him from the dead.
Acts 2:24 "whom God raised up, having loosed the pains of death, because it was not possible that He should be held by it.
Jesus was a perfect sinless sacrifice accepted by God to provide atonement for the faithful of all ages.
I hope you find this helpful.