I have come across (on line) a locomotive number 0 - an 0-4-0ST of the Tangxu Railway in China, preserved at the Datong Railway Museum, see
https://www.steamlocomotive.info/vlocomotive.cfm?Display=27924 or
https://www.flickr.com/photos/lhoon/191839921 .
But in general, when things (not just locomotives) are numbered, it is customary to start at 1.
And traditionally that is what railways did - in general having multiple series for different types of vehicle: the concept of a mixed train being formed of loco no. 1 hauling 1st class carriage no. 1, 3rd class carriage no. 1, van no.1, open wagon no.1 and brake van no.1 may be apocryphal, but I believe there were railways with the appropriate series of numberings... Even if such complexities were reduced, separate series for locos, passenger and freight vehicles remained normal.
When there came to be a desire - at different times on different railways - to have locomotives of the same class within a block (often many such!) of numbers for ease of identification, the numbers were still within the one sequence of loco numbers, and it was logical to start 'blocks' at ~0 or ~00, and that is what the GWR (extensively), LMSR (to a lesser extent) and later BR (for standards and diesels) - sometimes, and to varying extents, using the number of the class leader to identify the class - and, at least to some extent, for the BR standards, the first two digits as a class or type indicator.
But abroad, when the Austrian kkStB decided in 1886 to have a system of class numbers, with locos of each class then starting from ~01, to give three or four digit loco numbers starting with 101 (first loco of class 1) they soon found an issue when classes came to have more then 99 members. So in 1904 they changed the system to put a '.' between the class and individual loco numbers - to now start with 1.01, so 200 could be renumbered to be with its class mates as 1.100, and 11.01 could be distinguished from 1.101 [note - random numbers to demonstrate system]. But this did consider the two parts of the number as being separate sequences, i.e. class number + individual number within class.
Trivia question: was the Austrian kkStB the first railway to adopt this now widely used system?
Eventually, when in the early 1970s BR did decide on a renumbering, based on the class numbers, to give what we call 'TOPS Numbers', they did work on the basis that the second part (individual loco id) would be a separate number sequence, starting from 001...