bof has given you the useful example of the Michael line; here are two more examples that are also useful examples of a variety of things.
The Sorgenfrey plane $\Bbb S^2$ is the product of two copies of the Sorgenfrey line $\Bbb S$, which is $\Bbb R$ with the topology generated by the base $\big\{[a,b):a,b\in\Bbb R\text{ and }a<b\big\}$. (The Sorgenfrey line is also known as the reals with the lower-limit topology.) The topology on $\Bbb S^2$ is finer than the usual topology on $\Bbb R^2$, so it is Hausdorff. $\Bbb Q\times\Bbb Q$ is a countable dense subset of $\Bbb S^2$, which is therefore separable. But $\{\langle x,-x\rangle:x\in\Bbb R\}$ is an uncountable discrete subspace of $\Bbb S^2$, so it is not separable.
The Niemytzki plane is another useful example. Let $X=\{\langle x,y\rangle\in\Bbb R^2:y\ge 0\}$, the closed upper half-plane. Let $p=\langle x,y\rangle\in X$.
- If $y>0$, $\{B(p,r):r\le y\}$ is a local base at $p$, where $B(p,r)$ is the usual open ball of radius $r$ centred at $p$. (In other words, we take as basic open nbhds of $p$ the usual open balls that lie entirely above the $x$-axis.)
- If $y=0$, the basic open nbhds of $p$ are the sets of the form $\{p\}\cup B(\langle x,r\rangle,r)$ for $r>0$, consisting of $p$ and an open disk tangent to the $x$-axis at $p$. (This is why the space is also known as the tangent disk space.)
It’s straightforward to check that $X$ is Hausdorff, and clearly $X\cap(\Bbb Q\times\Bbb Q)$ is a countable dense subset of $X$, so $X$ is separable. However, the $x$-axis is a discrete subspace of $X$ that is uncountable and therefore not separable.
Two other important examples are noted in this answer: $\beta\Bbb N$, the Čech-Stone compactification of the natural numbers, and the Mrówka space $\Psi$.