Let $X$ be a Hilbert space, $y_1,y_2,...$ be a sequence of vectors in $H$ such that every $x \in{} X$ is finite linear combination of $y_1,y_2,..$. I want to show that $X$ is finite dimensional.
My attempt: If $X$ is infinite dimensional, we can extract an infinite and countable orthonormal set $\left\{{e_n: n \in \mathbb{N}}\right\} \subseteq X$. Since $\sum_{n=1}^\infty{\frac{ \left\|{e_n}\right\|}{n^2}} <\infty$ and $X$ is complete, then $\sum_{n=1}^\infty{\frac{e_n}{n^2}} \in X$, so there exists some $N$ with $\sum_{n=1}^\infty{\frac{e_n}{n^2}}=\alpha_1 y_1+....+\alpha_N y_N$. Then my idea is contradict the linear independence of $\left\{{e_n: n \in \mathbb{N}}\right\}$.
If your orthonormal basis is arbitrary, then probably you cannot get a contradiction since (e.g.) you could have $y_1 = \sum_{n=1}^\infty \frac{e_n}{n^2}.$
You need an orthonormal set which is formed from $y_i$'s. Note $X = \text{span}\{ y_1, y_2,\cdots\}$. Assume the contrary that $X$ is infinite dimensional. Then by taking a subsequence if necessary, assuming that $\{y_1, y_2, \cdots\}$ are linearly independent. Then by Gram-Schmidt process, there is an orthonormal set $\{e_1, e_2, \cdots\}$ so that $e_1 = y_1/\|y_1\|$ and
$$\operatorname{span}\{ e_1, \cdots, e_n\} = \operatorname\{ y_1, \cdots, y_n\}$$
for all $n$. Note that your conditions implies that every $x\in X$ can be written as a finite combination $x = a_1 e_1 + \cdots a_m e_n$. Now you can consider
$$x = \sum_{n=1}^\infty \frac{e_n}{n^2}.$$
It is clear (by taking inner product with each $e_i$) that this cannot be written as a finite linear combination of $e_i$'s. Thus it is a contradiction.