To remove ambiguity, I already gave related definitions at the end of this question.
A subset $X \subseteq \mathbb{R}^{N}$ is called a smooth $n$-dimensional manifold if $\forall x \in X$, $\exists$ a diffeomorphism $\varphi: U \to V$ such that $V$ is open in $X$, $U$ is open in $\mathbb{R}^{n}$, and $x \in V$. Then $\varphi$ is called a local parameterization of $V$. The inverse $\varphi^{-1}$ is called a local coordinate system, or chart, on $V$.
Lemma: Let $A$ be open in $\mathbb R^m$, $B$ open in $\mathbb R^n$, and $f:A \to B$ a diffeomorphism. Then $m = n$. [A proof can be found here]
Let $X \subseteq \mathbb R^N$ be a smooth $n$-dimensional manifold and $x \in X$. Let $\varphi: U \to V$ be a local parameterization around $x \in V$. Here $U \subseteq \mathbb R^n$ and $V \subseteq \mathbb R^N$. It follows that $\varphi$ is a diffeomorphism. By our Lemma, $n=N$.
Clearly, the statement $n=N$ is not correct, but I could not spot the error. Could you elaborate on where is my logical mistake?