It is an elementary fact that multiplication in $\mathbb{N}$ is commutative:
$$(\forall n,m)\ n \cdot m = m \cdot n$$
This - among other things - implies that the representation of an $n \in \mathbb{N}$ as a product of primes (which always exists) is unique upto permutations of the factors in the term representing $n$.
But what does this have to do with the fact, that each permutation $\pi:\mathbb{N} \rightarrow \mathbb{N}$ that only permutes primes (as members of $\mathbb{N}$, not as members of a term!) induces an automorphism of $\langle \mathbb{N}, \cdot \rangle$ (as I learned here).
I assume that a permutation $\pi:\mathbb{N} \rightarrow \mathbb{N}$ induces an automorphism of $\langle \mathbb{N}, \cdot \rangle$ when
$$(\forall n,m)\ \pi(n)\cdot \pi(m) = \pi(n\cdot m)$$
What has to be shown then is:
When for a permutation $\pi:\mathbb{N} \rightarrow \mathbb{N}$
$$(\forall n)\ \pi(n) \neq n \rightarrow \operatorname{prim}(n)$$
then
$$(\forall n,m)\ \pi(n)\cdot \pi(m) = \pi(n\cdot m)$$
How do I show this even for the most simple permutation $\pi_{23} = (2,3)$? Is the above maybe the wrong definition of automorphism of $\langle \mathbb{N}, \cdot \rangle$? I am confused by the fact
$$\pi_{23}(2) \cdot \pi_{23}(2) = 3 \cdot 3 = 9 = \pi_{23}(9) \neq \pi_{23}(2 \cdot 2)$$
The $\pi_{23}$ you've written is only the permutation on the primes; it's not the induced permutation on $\mathbb{N}$. To get that one (call it $\Pi_{23}$) you need to use your definition to expand it to the non-primes. Then $\Pi_{23}(4)$ $= \Pi_{23}(2\cdot 2)$ $= \Pi_{23}(2)\cdot\Pi_{23}(2)$ $=\pi_{23}(2)\cdot\pi_{23}(2)$ $=3\cdot 3=9$ by definition. Essentially, if you write every $n$ as a vector 'over' the primes, with coefficients $\geq 0$ and all sufficiently large coefficients $0$, then the original permutation $\pi$ corresponds to a relabeling of the primes, and the induced permutation $\Pi$ corresponds to how numbers map under this relabeling. In this notation, starting with e.g. $120=2^4\cdot 3^1\cdot 5^1 = \langle 4,1,1\rangle$, we 'relabel' (reinterpret) the vector as $3^4\cdot 2^1\cdot 5^1 = 810$, so $\Pi_{23}(120)=810$.