The analysis by @DaleM would be applicable in most, if not all, common law jurisdictions.
Also, it is a majority or minority of the deciding panel that matters. Some supreme courts occasionally or routinely decide cases with a panel that is less than the entire roster of the court.
For example, suppose that New Zealand's highest court decides a matter by a 2-1 decision in a case where one other justice recused himself due to a personal financial interest in the case and there was one vacancy on the court at the time due to a car accident shortly before it was decided. The decision of the two justices in the majority would be binding on lower courts even though it was made by just 2 justices in a 5 justice court.
In most non-common law countries, the highest appellate court has dozens or even a hundred or more justices, and almost all cases are heard by panels that contain a minority of the judges of that court. But again, the decision of the majority of the panel would still be binding (although appellate case precedents, in general, have less law making force in civil law countries than in common law countries).
Another complicating factor is when there is a majority behind part of the decision, but some judges who joined the majority add a concurring opinion that does not capture the majority. On one hand, the majority opinion is the only one that is binding. On the other, a clarification containing in a concurring opinion of this type can often be very persuasive (and like a dissenting opinion, can clarify the scope of the holding of a majority opinion).
Likewise, dissenting opinions, while they are obviously not binding precedent, can sometimes clarify what a majority opinion means by virtue of the fact that the majority to not agree with it. So, while a decision with a majority and not dissenting opinion might be open to a particular interpretation, that would not generally be true if the interpretation proposed is one adopted by a dissenting opinion.
A particularly complicated and rare configuration is where you have, for example, a 4-1-4 decision in the U.S. Supreme Court where 4 of the justices agree on a result for one reason, a 1 justice agrees on the result for another reason which the 4 other justices in the majority do not agree with the remaining majority justice upon. In these cases, the narrow majority result holding is a precedent, but the legal theory behind the ruling may not end up becoming law.
For example, eight justices argue that the decision about whether a constitutional amendment to the U.S. constitution applies to the states is all of nothing and that it applies in state court the same way that it does in federal court. Four justices say a particular provision always applies in full to the states, four justices say that it never applies to the states, and one justice says that it applies in this situation but not in the same way that it does in federal courts. The holding about the particular fact pattern is precedent, but the general principle that constitutional amendments apply to the states on an all or nothing basis that eight out of nine justices agreed with, does not become binding precedent. See Apodaca v. Oregon, 406 U. S. 404 (1972) (regarding the scope of the right to a criminal jury trial in state court) holding overturned in Ramos v. Louisiana, 139 S. Ct. 1318 (2019).