The 1892 RLDS edition changed the plural commandments to the singular. This edition is basically a reset copy of the first RLDS edition (dating from 1874), with very little conscious editing. The 1892 change here was probably accidental. Nonetheless, the 1908 RLDS edition retained the singular commandment, perhaps intentionally.
Nephi intends to say here that he had ruled over his older brothers Laman and Lemuel because the Lord had commanded him to do so. This reading seems to derive from the Lord’s words to Nephi early on in 1 Nephi:
Technically speaking, in 1 Nephi 2:22 the Lord isn’t commanding Nephi to be a ruler and a leader over his brethren; he is simply declaring that this will happen provided Nephi keeps the commandments. However, there may have been other situations where the Lord specifically commanded Nephi to take the lead over his brothers. Most of the events in 1 Nephi presume as much.
The earliest text has examples of both singular and plural in the phrase “commandment(s) of the Lord”, with the plural dominating (27 of commandments and 7 of commandment), so either singular or plural is possible. The plural is used more generally and can even be used when only one commandment may be involved:
On the other hand, the singular “commandment of the Lord” is indeed restricted to cases where a single commandment is at issue. We have also seen that Oliver Cowdery sometimes changed cases of the singular commandment to the plural (in 1 Nephi 3:16 and 1 Nephi 4:34), but here in 2 Nephi 5:19 the RLDS text made the change in the opposite direction.
Since the plural is possible here in 2 Nephi 5:19, we will let the earliest textual reading stand (“according to the commandments of the Lord”). Of course, this passage could be an additional example of where Oliver Cowdery emended a singular commandment to the plural.
Summary: Maintain the plural usage commandments in 2 Nephi 5:19, the earliest extant reading of the text.