A binary operation is an operation that takes two elements (pair) of some set and then map them uniquely to an element in the same set.
Formally, a binary operation on a non empty set $S$ is a map $$f:S \times S \to S$$ that have the following properties
(1) $f$ is defined for every pair of elements in $S$
(2) $f$ uniquely associates each pair of elements in $S$ to some element of $S$
You can have a lot of binary operations on the set $S$ that you provided but for instance if your binary operation $*$ has map $a*b = c$ then it can't be true that $a*d = c$ as well, it fails the second property of the binary operation. This is how you can build your table, assume $a*b=c$ then $a*c \neq c$ but maybe $=d,e,f$ and if you chose that $a*c =d$ then $a*d \neq c,d$ but it can be equal to $e,f$ and so on, you see where is that going !
Below is a possible table for the binary operation $*$ on $S$
$$
\begin{array}{c|lcr}
*& e & a & b & c & d \\
\hline
e & e & a & b & c & d \\
a & a & b & c & d & e \\
b & b & c & d & e & a \\
c & c & d & e & a & b \\
d & d & e & a & b & c
\end{array}$$
is an example of a table for a binary operation that satisfies the two properties, as a matter of fact, this is a table of a group with operation $*$ as well as the identity is the element $e$, This table is actually very easy to build, do you see the shifting in each row and also this table is symmetric meaning that row 1= col1, row 2= col2 and so on, It's also commutative table, $a*b = b*a = e$ and so on.
Keep in mind, that this is not the only table that you can build, actually a table that has distinct elements row wise and column wise is also valid, for example a row which has $$a \space a \space b \space c \space d$$ is not allowed but a row which has $$c \space d \space e \space b \space a$$ is allowed , same for columns, there are many tables that can be generated, can you count how many tables are possible ??