B"H
The source, ultimately, is the verse you cited
However, the Torah doesn't work by deriving laws directly from verses on our own, Hashem gave us the Torah Shebaal Peh to tell us what verses are sources for what laws and why (see Rambam introduction to the Mishnah).
The source in the Talmud for the idea of following the majority rule in judgment is the beginning of tractate Sanhedrin
ומנין להביא עוד שלשה ממשמע שנאמר (שמות כג, ב) לא תהיה אחרי רבים לרעות
שומע אני שאהיה עמהם לטובה אם כן למה נאמר אחרי רבים להטות לא כהטייתך
לטובה הטייתך לרעה הטייתך לטובה על פי אחד הטייתך לרעה על פי שנים
And from where is it derived to bring three more judges to the court?
From the implication of that which is stated: “You shall not follow a
multitude to convict” (Exodus 23:2), I would derive that I may not
convict a person on the basis of a majority but I should follow the
majority to exonerate. If so, why is it stated in the same verse: “To
incline after a multitude,” from which it can be understood that the
majority is followed in all cases? In order to resolve the apparent
contradiction it must be explained: Your inclination after the
majority to exonerate is not like your inclination after the majority
to convict. Your inclination after the majority to exonerate can
result in a verdict by a majority of one judge. But your inclination
after the majority to convict a transgressor must be by a more
decisive majority of at least two. Therefore, the court must have at
least twenty-two judges.
Technically, the question didn't specify if there's a difference between dinei nefashos and dinei mamonos.
The source in the Gemara there for 3 judges in monetary cases is a bit more nuanced.