First, refer to Example 2.2.3 in the book Topics in Algebra by I.N. Herstein, 2nd edition.
Imitating the relations in $S_3$, let us consider two objects $\phi$ and $\psi$ such that
$$ \phi^2 = \psi^n = e, \tag{0} $$
and
$$ \phi \psi = \psi^{n-1} \phi, $$
$$ \phi \psi^2 = \psi^{n-2} \phi, $$
and so on
$$ \phi \psi^{n-1} = \psi \phi. $$
Along the lines of Example 2.2.3 in Herstein, let $X$ be the following set:
$$ X \colon= \left\{ \, x_1, \ldots, x_n \, \right\}. $$
Let us first suppose that our $n$ is an odd natural number greater than $2$.
And, let $\phi$ and $\psi$ be the following permutations of elements (i.e. bijective self-maps) of $X$:
$$ \phi \colon \begin{matrix} & x_1 \longrightarrow x_{n-1} \\ & x_2 \longrightarrow x_{n-2} \\ & x_3 \longrightarrow x_{n-3} \\ & \vdots \\ & x_{(n-1)/2} \longrightarrow x_{(n+1)/2} \\ & x_{(n+1)/2} \longrightarrow x_{(n-1)/2} \\ & \vdots \\ & x_{n-3} \longrightarrow x_3 \\ & x_{n-2} \longrightarrow x_2 \\ & x_{n-1} \longrightarrow x_1 \\ & x_n \longrightarrow x_n \end{matrix} \qquad \mbox{ in other words } \qquad x_i \longrightarrow \begin{cases} x_{n-i} \ & \mbox{ for } i = 1, 2, \ldots, n-1; \\ x_n \ & \mbox{ for } i = n; \end{cases} $$
and
$$ \psi \colon \begin{matrix} & x_1 \longrightarrow x_2 \\ & x_2 \longrightarrow x_3 \\ & x_3 \longrightarrow x_4 \\ & \vdots \\ & x_{n-1} \longrightarrow x_n \\ & x_n \longrightarrow x_1 \end{matrix} \qquad \mbox{ in other words } \qquad x_i \longrightarrow \begin{cases} x_{i+1} \ & \mbox{ for } i = 1, 2, \ldots, n-1; \\ x_1 \ & \mbox{ for } i = n. \end{cases} $$
Note that our $n$ here is a natural number (in fact an odd natural number) greater than $2$.
Then we note that
$$ \phi \psi \colon \begin{matrix} & x_1 \longrightarrow x_n \\ & x_2 \longrightarrow x_{n-1} \\ & x_3 \longrightarrow x_{n-2} \\ & x_4 \longrightarrow x_{n-3} \\ & \vdots \\ & x_{(n-1)/2} \longrightarrow x_{(n+3)/2} \\ & x_{(n+1)/2} \longrightarrow x_{(n+1)/2} \\ & \vdots \\ & x_{n-3} \longrightarrow x_4 \\ & x_{n-2} \longrightarrow x_3 \\ & x_{n-1} \longrightarrow x_2 \\ & x_n \longrightarrow x_1 \end{matrix} \qquad \mbox{ in other words } \qquad x_i \longrightarrow x_{n+1-i} \ \mbox{ for } i = 1, 2, \ldots, n, $$
whereas
$$ \psi \phi \colon \begin{matrix} & x_1 \longrightarrow x_{n-2} \\ & x_2 \longrightarrow x_{n-3} \\ & x_3 \longrightarrow x_{n-4} \\ & \vdots \\ & x_{(n-1)/2} \longrightarrow x_{(n-1)/2} \\ & x_{(n+1)/2} \longrightarrow x_{(n-3)/2} \\ & \vdots \\ & x_{n-2} \longrightarrow x_1 \\ & x_{n-1} \longrightarrow x_n \\ & x_n \longrightarrow x_{n-1} \end{matrix} \qquad \mbox{ in other words } \qquad x_i \longrightarrow \begin{cases} x_{n-1-i} \ & \mbox{ for } i = 1, 2, \ldots, n-2; \\ x_n \ & \mbox{ for } i = n-1; \\ x_{n-1} \ & \mbox{ for } i = n. \end{cases} $$
Thus we see that
$$ \phi \psi \neq \psi \phi. \tag{1} $$
Further we note that
$$
\begin{align}
\psi^2 & \colon \begin{matrix} & x_1 \longrightarrow x_3 \\ & x_2 \longrightarrow x_4 \\ & x_3 \longrightarrow x_5 \\ & \vdots \\ & x_{n-2} \longrightarrow x_n \\ & x_{n-1} \longrightarrow x_1 \\ & x_n \longrightarrow x_2 \end{matrix} \qquad \mbox{ in other words} \qquad x_i \longrightarrow \begin{cases} x_{i+2} \ & \mbox{ for } i = 1, 2, \ldots, n-2; \\ x_1 \ & \mbox{ for } i = n-1; \\ x_2 \ & \mbox{ for } i = n; \end{cases} \\
\\
\psi^3 & \colon \begin{matrix} & x_1 \longrightarrow x_4 \\ & x_2 \longrightarrow x_5 \\ & \vdots \\ & x_{n-3} \longrightarrow x_n \\ & x_{n-2} \longrightarrow x_1 \\ & x_{n-1} \longrightarrow x_2 \\ & x_n \longrightarrow x_3 \end{matrix} \qquad \mbox{ in other words} \qquad x_i \longrightarrow \begin{cases} x_{i+3} \ & \mbox{ for } i = 1, 2, \ldots, n-3; \\ x_{n+1-i} \ & \mbox{ for } i = n-2, n-1; \\ x_3 \ & \mbox{ for } i = n; \end{cases} \\
\\
& \vdots \\
\\
\psi^{n-1} & \colon \begin{matrix} & x_1 \longrightarrow x_n \\ & x_2 \longrightarrow x_1 \\ & x_3 \longrightarrow x_2 \\ & x_4 \longrightarrow x_3 \\ & \vdots \\ & x_{n-1} \longrightarrow x_{n-2} \\ & x_n \longrightarrow x_{n-1} \end{matrix} \qquad \mbox{ in other words } \qquad x_i \longrightarrow \begin{cases} x_n \ & \mbox{ for } i = 1; \\ x_{i-1} \ & \mbox{ for } i = 2, 3, \ldots, n. \end{cases} \end{align} $$
In short, we note that, for each $j = 1, 2, 3, \ldots, n-1$, we have
$$ \psi^j \colon \qquad x_i \longrightarrow \begin{cases} x_{i+j} & \mbox{ if } i+j \leq n, \\ x_{i+j-n} & \mbox{ otherwise}. \end{cases} \ \mbox{ for each } i = 1, 2, \ldots, n. \tag{2} $$
And, of course $$ \psi^n = e, $$
where $e$ denotes the identity element in $S_n$ which leaves every element of our set $X$ fixed.
Now we see that
$$ \psi^{n-1} \phi \colon \begin{matrix} & x_1 \longrightarrow x_n \\ & x_2 \longrightarrow x_{n-1} \\ & x_3 \longrightarrow x_{n-2} \\ & x_4 \longrightarrow x_{n-3} \\ & \vdots \\ & x_{n-1} \longrightarrow x_2 \\ & x_n \longrightarrow x_1 \end{matrix} \qquad \mbox{ in other words } \qquad x_i \longrightarrow x_{n+1-i} \ \mbox{ for } i = 1, 2, \ldots, n; $$
this shows that
$$ \psi^{n-1} \phi = \phi \psi. $$
In fact, for each $j = 1, 2, \ldots, n-1$, we see that
$$ \phi \psi^j \colon \qquad x_i \longrightarrow \begin{cases} x_{n-i+j} \ & \mbox{ for } i = 1, 2, \ldots, n-1 \mbox{ such that } i \geq j; \\ x_{j-i} \ & \mbox{ for } i = 1, 2, \ldots, n-1 \mbox{ such that } i < j; \\ x_j \ & \mbox{ for } i = n. \end{cases} \tag{3} $$
On the other hand, for each $j = 1, 2, \ldots, n-1$, we see that
$$ \psi^{n-j} \colon \qquad x_i \longrightarrow \begin{cases} x_{n + i -j} & \mbox{ if } i \leq j , \\ x_{i-j} & \mbox{ if } i > j \end{cases} \ \mbox{ for each } i = 1, 2, \ldots, n. $$
Therefore, for each $j = 1, 2, \ldots, n-1$, we have
$$ \psi^{n-j} \phi \colon \qquad x_i \longrightarrow \begin{cases} x_{j-i} \ & \mbox{ for } i = 1, 2, \ldots, n-1 \mbox{ such that } i < j; \\ x_{n-i+j} \ & \mbox{ for } i = 1, 2, \ldots, n \mbox{ such that } i > j; \\ x_n \ & \mbox{ for } i = 1, 2, \ldots, n-1 \mbox{ such that } i = j. \end{cases} \tag{4} $$
From (3) and (4) we get
$$ \phi \psi^j = \psi^{n-j} \phi. \tag{5} $$
for each $j = 1, 2, \ldots, n-1$. And, this equality holds of course for $j = 0$ or $j = n$.
Hence for our desired non-abelian group of order $2n$ we have the set
$$ G \colon= \left\{ \, e, \psi, \psi^2, \ldots, \psi^{n-1}, \phi, \phi \psi, \phi \psi^2, \ldots, \phi \psi^{n-1} \, \right\} $$
under the binary operation (of composition of mappings) such that
$$ \psi^n = e = \phi^2; $$
$$ \phi \psi^j = \psi^{n-j} \phi \ \mbox{ for each } j = 0, 1, 2, \ldots, n-1, n; $$
and of course
$$ \phi \psi \neq \psi \phi $$
because here our $n > 2$.
I'll discuss the case of an even natural number $n > 2$ later.