I found that A003172 in OEIS lists integers $n$ such that $ \mathbb Q[\sqrt n]$ is an UFD; but I think for all positive square-free integer $n$, $\mathbb Q[\sqrt n]$ should be a field, and all fields are UFDs, right?
I think there might be something wrong in my understanding.
It is easy to see that $6$ has two different factorizations in $\mathbb{Z}[\sqrt{10}]$, which is the ring of integers of the field, $\mathbb{Q}[\sqrt{10}]$.
$$6=(\sqrt{10}+2)(\sqrt{10}-2)=2\cdot 3$$ thus there are two different factorizations. Of course one also has to show that $2$ and $3$ do not factor, but this is obvious as
$$x^2\equiv 2 \bmod 10$$ $$x^2\equiv 3 \bmod 10$$ have no solution.