The only solution would be going through all cycle types of all permutations which is a lot of work. Is there any smarter solution than this one?
Thank you in advance!
The maximum order of an element of $S_n$ is assumed for a permutation which is a product of cycles of distinct lengths. So in stead of considering all cycle types, you only need to consider the cycle types $$(1,2,4),\qquad (1,6),\qquad(2,5),\qquad(3,4),\qquad(7),$$ which quickly shows that the maximum order is $12$.
In fact more is true; the maximum is assumed for a cycle type of which the entries are pairwise coprime prime powers, where $1$ also counts as a prime power. This leaves only the latter three cycle types above, and for larger symmetric groups this reduces the number of cycle types to check significantly. This is harder to prove though.
Edit: To clarify, the sequences above are not cycles in $S_7$, but cycle types of elements of $S_7$. For example, the cycle type of $(2\ 3)(4\ 5\ 6\ 7)\in S_7$ is $(1,2,4)$, because it is the product of a $1$-cycle, a $2$-cycle and a $4$-cycle.