Do you not know what the word "if" means?--"
IF we observe to do all these commandments before the Lord our God."
IF they didn't observe to do all the commandments they
WERE GUILTY OF ALL (Jas.2:10).
The Lord Jesus told the Jews that none of them kept the law (Jn.7:19) so everyone of them were guilty of all.
You are so lacking in spiritual discernment that you think that being guilty of all somehow contributed to their salvation.
The verse you quoted says that it will be "our righteousness" if we observe to do all these commandments before the Lord our God, as he hath commanded us.
The following verse describes the "self- righteousness" of all the Jews who lived under the law:
"But we are all as an unclean thing, and all our righteousnesses are as FILTHY RAGS; and we all do fade as a leaf; and our iniquities, like the wind, have taken us away" (Isa.64:6).
Since you refuse to believe the Lord Jesus' plain words spoken to the Jews who lived under the law as to how they were saved you lack the righteousness which is of God:
"Verily, verily, I say unto you, He that believeth on me hath everlasting life" (Jn.6;47).
"It is the spirit that quickeneth; the flesh profiteth nothing: the words that I speak unto you, they are spirit, and they are life" (Jn.6:63).
The verdict which you will receive at the great White Throne is: "You righteousness is as filthy rages--depart from Me because I never knew you!"