Addition, Subtraction, and Torah
In this week’s Torah portion we learn about the commands to “not add to” (lo tosif) and “not take away from” (lo tigra) any detail of God’s commandments (Deuteronomy 4:2). The context of the Torah portion seems to refer to the specific commands God enjoins upon Israel at the moment of Revelation (see Deuteronomy 4:40 and 5:3). So if the commands we read in the Torah are, in layman’s terms, not to be messed with, what gave the rabbis the right to mess with them? For that matter, what gives us the right to mess with them? Should we accept the Torah’s teachings as they are, or is there room for us to play with them to make them relevant for us today? And finally, if we determine we can play with these commandments, how do we determine the rules of the game? (Rabbi Ari Saks)

(א) אֵ֣ת כׇּל־הַדָּבָ֗ר אֲשֶׁ֤ר אָנֹכִי֙ מְצַוֶּ֣ה אֶתְכֶ֔ם אֹת֥וֹ תִשְׁמְר֖וּ לַעֲשׂ֑וֹת לֹא־תֹסֵ֣ף עָלָ֔יו וְלֹ֥א תִגְרַ֖ע מִמֶּֽנּוּ׃ {פ}

(1) Be careful to observe only that which I enjoin upon you: neither add to it nor take away from it.

את כל הדבר. קַלָּה כַּחֲמוּרָה (שם):
את כל הדבר EVERYTHING [I COMMAND YOU] — light precepts as well as grave ones (Sifrei Devarim 82:1),
לא תסף עליו. חֲמִשָּׁה טֹטָפוֹת, חֲמִשָּׁה מִינִין בַּלּוּלָב, אַרְבַּע בְּרָכוֹת לְבִרְכַּת כֹּהֲנִים (ספרי):

לא תסף עליו THOU SHALT NOT ADD THERETO — as, for instance, to place five chapters in the Tefillin, to employ five species of fruit and plants in the fulfilment of the command of Lulav, to recite four instead of three blessings in the Benedictions of the priests (Sifrei Devarim 82:4; cf. Rashi on Deuteronomy 4:2).

לא תוסף עליו כי אולי תוסיף דבר נמאס אצלו ית' כמו שיהיה אם תרצה להוסיף מיני עבודות לאל ית' שלפעמים תהיה העבודה הנוספת דבר נמאס אצלו ית' כמו שריפת הבנים:

לא תוסף עליו, for you might add something which is despicable in the eyes of the Lord. If, perchance, you would add new ways of the serving the Lord, you have no assurance that such innovation is acceptable to God, for instance the burning of one’s children in God’s honour.

(ב) לֹ֣א תֹסִ֗פוּ עַל־הַדָּבָר֙ אֲשֶׁ֤ר אָנֹכִי֙ מְצַוֶּ֣ה אֶתְכֶ֔ם וְלֹ֥א תִגְרְע֖וּ מִמֶּ֑נּוּ לִשְׁמֹ֗ר אֶת־מִצְוֺת֙ ה' אֱלֹֽקֵיכֶ֔ם אֲשֶׁ֥ר אָנֹכִ֖י מְצַוֶּ֥ה אֶתְכֶֽם׃
(2) You shall not add anything to what I command you or take anything away from it, but keep the commandments of the LORD your God that I enjoin upon you.
(א) לא תוספו. מדעתכם ותחשבו כי היא עבודה לשם ג״‎כ לא תגרעו ואשר אמרתי למען תחיו אין צורך לעדים כי עיניכם הרואות:

(1) You shall not add i.e., you shall not add your own ideas, thinking that you thereby serve God. Likewise, you shall not diminish.

ולפי דעתי אפילו בדא לעשות מצוה בפני עצמה כגון שעשה חג בחדש שבדא מלבו כירבעם (מלכים א יב לג) עובר בלאו וכך אמרו (מגילה יד) לענין מקרא מגלה מאה ושמונים נביאים עמדו להם לישראל ולא פחתו ולא הוסיפו על מה שכתוב בתורה אפילו אות אחת חוץ ממקרא מגילה

Ramban, Deuteronomy 4:2

...In my opinion: Even if he invents a standalone mitzvah such as making a holiday in a month that his own heart invented, as Yeravam did (Kings I, 12:33), he violates this negative commandment. So they say (Megilah 14a) regarding Megilat Esther on Purim: 180 prophets arose for Israel and they neither subtracted nor added to what is written in the Torah, even one letter, except for the reading of the Megilah...

(יא) עַל־פִּ֨י הַתּוֹרָ֜ה אֲשֶׁ֣ר יוֹר֗וּךָ וְעַל־הַמִּשְׁפָּ֛ט אֲשֶׁר־יֹאמְר֥וּ לְךָ֖ תַּעֲשֶׂ֑ה לֹ֣א תָס֗וּר מִן־הַדָּבָ֛ר אֲשֶׁר־יַגִּ֥ידֽוּ לְךָ֖ יָמִ֥ין וּשְׂמֹֽאל׃
(11) You shall act in accordance with the instructions given you and the ruling handed down to you; you must not deviate from the verdict that they announce to you either to the right or to the left.
Torah Temimah on Deuteronomy 4:2
It seems to me, the entire matter of Bal tosif ought to be understood [insofar as] the primary concern is that an addition should not bring in its wake a taking away. But were it not for this [concern], there is no sufficient reason for the prohibition of Bal tosif. For what does it matter to us, for example, if one were to use two etrogim, two palms [for the mitzvah of waving lulav and etrog on Sukkot]...But according to our explanation, the matter is clear. Namely, that when one would see concerning that which is written in the Torah [i.e. one etrog], that the number is not meant literally, he would be inclined to deduce permission also to take away, i.e. to fulfill his obligation with a defective etrog...[And the explanation of the Rashba] makes sense according to our interpretation, according to which the basic reason for the prohibition [of adding] is that it should not result in taking away, since that concern applies only to additions that an individual makes for himself, by his own decision and based on his own judgment. But it does not apply to the enactments of the sages -- general enactments for all Jews, the authenticity of which is uncontested (she-ein meharharin ba-zeh) -- who will not be inclined to base some other change, resulting in taking away and subtraction, upon it. ( translation from Rabbi Joel Roth Halakhic Process, 166)
Mishneh Torah, Rebels 2:9
A court has the authority to issue a decree and forbid something which is permitted and have its decree perpetuated for generations to come. Similarly, it has the authority - as a temporary measure - to release the Torah's prohibitions. What then is the meaning of the Scriptural prohibition: (Deut. 13:1) "Do not add to it and do not detract from it"?
The intent is that they do not have the authority to add to the words of the Torah or to detract from them, establishing a matter forever as part of Scriptural Law. This applies both to the Written Law and the Oral Law.
What is implied? The Torah states: (Ex. 23:19) "Do not cook a kid in its mother's milk." According to the Oral Tradition, we learned that the Torah forbade both the cooking and eating of milk and meat, whether the meat of a domesticated animal or the meat of a wild beast. The meat of fowl, by contrast, is permitted to be cooked in milk according to Scriptural Law. Now if a court will come and permit partaking of the meat of a wild animal cooked in milk, it is detracting from the Torah. And if it forbids the meat of fowl cooked in milk saying that this is included in "the kid" forbidden by the Scriptural Law, it is adding to the Torah.
If, however, the court says: "The meat of fowl cooked in milk is permitted according to Scriptural Law. We, however, are prohibiting it and publicizing the prohibition as a decree, lest the matter lead to a detriment and people say: 'Eating the meat of fowl cooked in meat is permitted, because it is not explicitly forbidden by the Torah. Similarly, the meat of a wild animal cooked in milk is permitted, because it is also not explicitly forbidden.' "And another may come and say: 'Even the meat of a domesticated animal cooked in milk is permitted with the exception of a goat.' And another will come and say: 'Even the meat of a goat is permitted when cooked in the milk of a cow or a sheep. For the verse mentions only "its mother," i.e., an animal from the same species.' And still another will come and say: 'Even the meat of a goat is permitted when cooked in goat's milk as long the milk is not from the kid's mother, for the verse says: "its mother."' For these reasons, we will forbid all meat cooked in milk, even meat from fowl."
Such an approach is not adding to the Torah. Instead, it is creating safeguards for the Torah. Similar concepts apply in all analogous situations.