כִּ֣י יִפָּלֵא֩ מִמְּךָ֨ דָבָ֜ר לַמִּשְׁפָּ֗ט בֵּֽין־דָּ֨ם לְדָ֜ם בֵּֽין־דִּ֣ין לְדִ֗ין וּבֵ֥ין נֶ֙גַע֙ לָנֶ֔גַע דִּבְרֵ֥י רִיבֹ֖ת בִּשְׁעָרֶ֑יךָ וְקַמְתָּ֣ וְעָלִ֔יתָ אֶ֨ל־הַמָּק֔וֹם אֲשֶׁ֥ר יִבְחַ֛ר יְהֹוָ֥ה אֱלֹהֶ֖יךָ בּֽוֹ׃
If a case is too baffling for you to decide, be it a controversy over homicide, civil law, or assault—matters of dispute in your courts—you shall promptly repair to the place that the Eternal your God will have chosen,
Torah Temimah points to Sanhedrin / Sifrei on the obligation to ascend to the high court.
כי יפלא וגו׳. מלמד שהולכין אחר הרוב.
English: “If a matter is too wonderful for you…” — this teaches that one follows the majority.
When the local court cannot decide, the matter is taken to the higher court; the language of the verse establishes the hierarchical system of courts.
Derash on the verse (Bavli / Sifrei) — not a formal named middah of the 13. The verse is the source for the obligation to bring unresolved cases to the central court.
When a local court is unable to reach a decision, the parties and the judges are required to ascend to the place that God chooses — the Great Sanhedrin.