You asked "is AB not a set with just one element?". The answer is no, because $AB$ consists of all elements that can be written as a finite sum of products of elements in $A$ and $B$.
A concrete example: take the ring $R = \Bbb{Z}$ and ideals $A = (2)$, $B = (3)$. In other words, $A$ is the set that consists of all multiples of $2$, and $B$ consists of all multiples of $3$.
Note that $6 \in AB$, since $6 = 2\cdot 3$ where $2 \in A$ and $3 \in B$. But also $24 \in AB$ since $24$ can be written as $24 = 2\cdot6 + 4\cdot 3$, where $2,4\in A$ and $6,3 \in B$. You could show that in this case, $AB = (6)$, or the set of multiples of $6$.