In this lecture, the lecturer gives a presentation
$$G = \langle a, b\mid a^3 = e, b^2 = e, aba = b\rangle,$$
then he says that the set of all elements of $G$ is
$$F=\{e, a, a^2, b, ba, ba^2\}.$$
How does one know all distinct elements of $G$ are exactly those in $F$, no more, no less? In general, given a presentation whose generators set is finite, is there a systematic way to find all distinct elements of the group?
It is not possible to write an algorithm
where you type in any finitely presented group you want and any pair of distinct words
and it tells you whether or not the words give different elements.
This is the famous word problem for groups.
$\\$
But given your specific example $G = \langle \;a\,,\,b\;| \;a^3 = e,\; b^2 = e,\; aba = b\;\rangle$,
you can prove that $F$ covers all the distinct elements of $G$ by checking that every word of at most four characters gives an element of $F$.
There are other, perhaps cleverer, ways of proving that $G$ is indeed the dihedral group of order $6$.