Let $|X| > \mathbb{N}$ and $f \in X^X$, we construct a function $g$ that commutes with $f$ but is not a power of $f$. Let $G$ be the directed graph of $f$. Split $G$ into connected components. Call a connected component boring if it is of the form $a_1, a_2, \cdots$ or $\{a_i\}_{i \in \mathbb{Z}}$ with $f(a_i) = a_{i+1}$. If $G$ has no non-boring components, then for size reasons, two must be isomorphic so we can take $g$ to be an isomorphism between the two and the identity on the rest of $X$. So suppose $C$ is a non-boring component and consider three cases
1: There is an $x \in C$ with $f^{-1}(x) = \emptyset$. Then since $C$ is not boring, there is an $n \geq 1$ with $y \in f^{-1}f^n(x)$ and $y \notin\{x, f(x), f^2(x), \cdots\}$. Then we can take $g(x) = y$ and for $z \neq x, g(z) = f^{n-1}(z)$.
2: 1 is not the case and $C$ contains no cycles. Then let $\{a_i\}_{i \in \mathbb{Z}} \subset C$ be a sequence with $f(a_i) = a_{i+1}$. For every element $c \in C$, let $d(c)$ denote the minimal non-negative integer for which $f^{d(c)}(c) \in \{a_i\}_{i \in \mathbb{Z}}$ and let $r(c)$ be the minimal integer for for which $f^{d(c)}(c) = a_{r(c)}$. Set $g(c) = a_{r(c) - d(c)}$. Since there is an infinite chain disjoint from $\{a_i\}_{i \in \mathbb{Z}}$, for every $n \geq 0$, $f^n$ sends some element outside $\{a_i\}_{i \in \mathbb{Z}}$ so $g$ commutes with $f$ but is not a power of $f$.
3: 1 is not the case and $C$ contains a cycle. Then there exists $\{a_i\}_{i \in \mathbb{Z}} \subset C$ with $f(a_i) = a_{i+1}$, $a_1$ is in a cycle and $a_j$ is not in a cycle for $j < 1$. Let $k$ be the smallest positive integer greater than $1$ with $a_1 = a_k$. For every element $c \in C$, let $d(c)$ denote the minimal non-negative integer for which $f^{d(c)}(c) \in \{a_i\}_{i \in \mathbb{Z}}$ and let $r(c)$ be the minimal integer for for which $f^{d(c)}(c) = a_{r(c)}$. Set $g(c) = a_{r(c) - d(c)}$. For the reasons in 2, $g$ commutes with $f$ but is not a power of $f$.