What is the difference between the nullish coalescing operator and the double-bar operator?
The double-bar operator falls back when the left side is falsy, and falsy covers six values. They are false, zero, the empty string, null, a missing value, and not-a-number. The nullish coalescing operator falls back only for null and for a missing value, and for nothing else.
That difference is the whole point, and it matters because zero, the empty string, and false are perfectly normal values in most areas of work. A price of zero is not the same as a price that you do not know. A count of zero is not the same as a count that you have not loaded yet. An empty search string is a real answer, and not an absent one.
So the rule is to use the nullish operator whenever the value is a number, a string, or a boolean that could legitimately be empty. Use the double-bar only when every falsy value really should be treated as absent. In practice, the nullish operator is the safer default for fallbacks, because it never destroys real data.
There is one more difference to know. The nullish operator cannot be mixed with the double-bar or the double-ampersand operator in the same expression unless you add parentheses, because the order of evaluation would otherwise be unclear. That restriction was added on purpose, to stop people writing a mixed expression and getting a result that they did not expect.