As Rionne says below, the rule is to use the name on the birth record when the birth was registered. The only exception per Style and Standards (see Help: Name, Last Name at birth) is when "The person was adopted as an infant and they never used their birth name".
I have an issue with this as I think, in the case you mention, sticking to the very very first name on registration is not necessarily appropriate. I can't tell for other countries, but in France in such a case, if the parents marry (actually, even if they don't but the father still acknowledges the child), the name change is retroactive. The mother's family name is struck and replaced by the father's name, and if you look for the child's birth in index tables, you will see it only under the father's name (since those tables are usually built after the name change occurred). Legally, the original name never existed, and in practice, the child never used it.
I created at least two profiles with odd family names because I followed the WikiTree rule when creating them, rather than French law, and I'm not happy with them (these two people are notables known by an alias, making things even more complicated): Johnny Halliday and Roger Vadim.
I feel this rule would need to be clarified, if not re-evaluated for cases like these.