How do we assure ourselves when defining an operation that it does not lead to contradictions? For example 0! := 1. I understand the practicality of why it is defined this way, but I am wary of what could happen if another such operation is created and defined in a way that leads to future contradictions that were not considered. This often happens when people come up with definitions for division by zero. How do we know it doesn’t happen with other definitions?
Note that I'm not asking about the consistency of our axioms for N or anything like that, but about definitions built upon those axioms.
A definition like that can't lead to a contradiction since it is just a definition: the meaning you've assigned to the symbols "$0!$".
A definition might lead to a problem with some rules of arithmetic you like. For example, if you chose to define $x^0 = 0$ instead of $1$ then the identlty $$ x^{a+b}= x^ax^b $$ would fail sometimes. So it would be a bad definition, but not a contradiction.
All the usual suggestions for how to define division by $0$ break some identity in ordinary arithmetic, which is why we don't use any of them.
Defining $0! = 1$ preserves the identity $$ n! = n(n-1)! $$ No other definition would do that.