I will go and do the things which the Lord hath commanded, for I know that the Lord giveth no commandments unto the children of men, save he shall prepare a way for them that they may accomplish the thing which he commandeth them.
is that it shouldn’t be read in isolation. 1 Nephi 3:7 is young man Nephi. “Give me a commandment and I will totally nail that commandment.” But then life continues to happen to Nephi:
2 Nephi 4:17
my heart exclaimeth: O wretched man that I am! Yea, my heart sorroweth because of my flesh; my soul grieveth because of mine iniquities. 18 I am encompassed about, because of the temptations and the sins which do so easily beset me. 19 And when I desire to rejoice, my heart groaneth because of my sins; nevertheless, I know in whom I have trusted.
Finally, old man Nephi is channeling Paul:
2 Nephi 25
25 For, for this end was the law given; wherefore the law hath become dead unto us, and we are made alive in Christ because of our faith; yet we keep the law because of the commandments. 26 And we talk of Christ, we rejoice in Christ, we preach of Christ, we prophesy of Christ, and we write according to our prophecies, that our children may know to what source they may look for a remission of their sins. 27 Wherefore, we speak concerning the law that our children may know the deadness of the law; and they, by knowing the deadness of the law, may look forward unto that life which is in Christ, and know for what end the law was given. And after the law is fulfilled in Christ, that they need not harden their hearts against him when the law ought to be done away.
The law is dead and Nephi is alive in Christ. Nephi's character arc takes him from a righteous young man who thinks he can live the law perfectly into a righteous old man who is transformed by grace.