If $M$ has 0 or 1 elements, the claim follows vacuously, so assume that $M$ has at least 2 elements. Let $x, y \in X$ such that $x \neq y$ and define $r := d(x, y)$. Then the open balls
\begin{equation}
B(x, r) = \{z \in X : d(x, z) < r\}, \quad
B(y, r) = \{z \in X : d(y, z) < r\}
\end{equation}
are disjoint with $x \in B(x, r)$ and $y \in B(y, r)$. Since $x, y \in X$ were arbitrary elements satisfying $x \neq y$, we are done. $\square$