An example of orthonormal sequence $(e_k)_{k \in \mathbb N}$ in a Hilbert space such that $\sum_{k=1}^{\infty} \langle x,e_k\rangle e_k$ is convergent but
$$x \neq \sum_{k=1}^{\infty} \langle x,e_k\rangle e_k.$$
My idea is to use the fact that $x = \sum_{k=1}^{\infty} \langle x,e_k\rangle e_k$ if and only if $x \in \overline{M} $ where $M:= span\{e_k ; k \in \mathbb N \}$. So I believe the idea is to find $x \notin \overline{M} $ But I find it difficult to find an example.
Consider the space $\ell^2$ and let $M$ be the set of those sequences $(a_n)_{n\in\mathbb N}\in\ell^2$ such that $a_n=0$ when $n$ is odd. Now, let $e_k$ be the sequence$$(e_k)_n=\begin{cases}1&\text{ if }k=2n\\0&\text{ otherwise.}\end{cases}$$Then this is an orthnormal famly and if $e\in\ell^2$ is defined as$$e_n=\begin{cases}1&\text{ if }k=1\\0&\text{ otherwise,}\end{cases}$$then $(\forall k\in\mathbb{N}):\langle e_k,e\rangle=0$ and therefore the series $\sum_{k=1}^\infty\langle e_k,e\rangle e_k$ converges to $0$, which is not $e$.