Formally, let N be the natural numbers object (in some topos), let z : 1 -> N be the zero arrow, and s : N -> N be the successor arrow. Then z;s;s : 1 -> N is the arrow which chooses 2 as an element of the NNO. Since z and s are unique up to unique isomorphism, so is 2. Moreover, since geometric morphisms between topoi preserve finite limits, the NNO should also be preserved, and that includes 2.
When the topos we choose/define is (equivalent to) Set, then we get the standard ordinal-number definition of 2.
To use a pun, this lets us upgrade from Dedekind-categoricity to a more modern and natural sort of categorical categoricity.