There are a few ways we can go about it, which ultimately amount to the same operation.
One is as the cardinal of the disjoint union of sets, which avoids the problem of union that you mentioned--and is simply cardinal addition, restricted to finite cardinals. Another is as the order type of the disjoint union, where the elements of the first set are supposed to be less than all the elements of the second, and the sets themselves keep the same orders--this is the non-recursive definition of ordinal addition. Yet another is to proceed recursively--for any ordinal $\alpha,$ we have $S(\alpha):=\alpha\cup\{\alpha\},$ and for any natural numbers $n,m,$ we define:
- $n+0:=n$
- $n+S(m):=S(n+m)$
Regardless, we end up with an addition operation having all the usual properties that we are used to.