Here we copy/paste/modify another answer:
Define
$\; \tau = (13)$
$\;\sigma = (1234)$
$1^{st} \text {group of calculations:}$
$\;\tau^1 = (13)$
$\;\tau^2 = \tau^0 \quad \text { - the identity permutation}$
$2^{nd} \text{ group of calculations:}$
$\;\sigma^1 = (12)\,(23) \,(34)$
$\;\sigma^2 = (13)\,(24)$
$\;\sigma^3 = (14)\,(24)\,(34)$
$\;\sigma^4 = \sigma^0 \quad \text { - the identity permutation}$
$3^{rd} \text{ group of calculations:}$
$\tau\sigma = (12) \,(34)$
$\tau\sigma^2 = (24)$
$\tau\sigma^3 = (14) \,(23)$
$4^{th} \text{ group of calculations:}$
$\sigma\tau = (14) \,(23)$
$\sigma^2\tau = (24)$
$\sigma^3\tau = (12)\,(34)$
So far we've identified exactly $8$ permutations that are in the group generated by $\tau$ and $\sigma$.
When we run the $4^{th} \text{ group of calculations}$ we get the same permutations as the $3^{rd} \text{ group of calculations}$, and we can now write these symbolic (defining) rules,
$\tag 1 \tau^2 = 1_d$
$\tag 2 \sigma^4 = 1_d$
$\tag 3 \sigma\tau = \tau\sigma^3$
Given any word (string) in the letters $\tau$ and $\sigma$ we can 'move' all the $\tau$ letters to the left and standardize (present/represent) the permutation to have the form
$\tag 4 \tau^n \sigma^m \quad n \in \{0,1\} \text{ and } m \in \{0,1,2,3\}$
We conclude that the group generated by $\tau$ and $\sigma$ has exactly $8$ elements.
Since
$\; \sigma \tau = \tau \sigma^3$
and
$\; \tau \sigma \ne \tau \sigma^3$
we also know that this a non-abelian subgroup of $S_4$.