Get an example of a metric on a countable set that not generates the discrete topology.

I think it may be a set in this way $0 \cup\{1/n:n\in\mathbb N\}$ with the metric $d(x,y)= \vert x-y \vert$ but I can not do a rigorous proof of because cannot be the metric discrete, is because there is no open ball that is exactly$\{0\}$ or what would be the example?

Your example works. To prove that $\{0\}$ is not open, recall the definition of the induced topology, which has "open balls" $B(x; \epsilon) = \{y \in S: d(x,y) < \epsilon\}$ as a basis. (you can take $\epsilon \in \Bbb Q_{>0}$ if you like). We thus have to show that:

$$\forall \epsilon >0 : B(0; \epsilon) \ne \{0\}$$

that is, there is for each $\epsilon > 0$ a point $x$ in the set so that $d(x, 0) < \epsilon$. Can you do this?