In the following answer I will assume you are familiar with germs of functions and derivations at a point. I will provide an argument starting with the definition of tangent space of a manifolds in terms of derivations and germs. I'll finally prove a theorem about the dimension of a tangent space defined in such a way and the proof relies on showing what you're asking. Nonetheless, if you are not interested in the argument being made in term of germs, as you used a different approach, just read the proof of the theorem, that construct explicitly the isomorphism \eqref{B} you're looking for.
Let $M$ be a differentiable manifold. Given $p\in M$, consider the real vector space of all derivations at a point p
$$\mathrm{Der}(p)=\{v:C^{\infty}_p\rightarrow\mathbb{R}\text{ derivation}\}=:\mathrm{T}_pM\tag{A}\label{A}$$
where $C^{\infty}_p$ is the set of germs at $P$.
We'll define \eqref{A} to be the tangent space at $P$.
So this is how one defines the tangent space for a general smooth manifold. The idea now is the following, we want to use the geometric idea of tangent space we have in $\mathbb{R}^n$, which coincides with $\mathbb{R}^n$ itself of course, and use the properties of smooth manifolds to show how these are related.
First we'll need a lemma, though.
Lemma
Let $x_0\in\mathbb{R}^n, f\in C^{\infty}_{x_0}$ a germ at $p$, then the following holds
$$\exists g_i\in C^{\infty}_{x_0}: f(x)=f(x_0)+g_i(x^i-x^i_0)\qquad g_i(x_0)=\frac{\partial f}{\partial x^i}\bigg\lvert_{x_0}$$
in a sufficiently small neighborhood of $x_0$ (summation over repeated indices understood).
This is basically a version of Taylor's formula for germs, let me know if you want me to prove it.
Note that the assumption that $f\in C^{\infty}_{x_0}$ is crucial as it follows that $g_i\in C^{\infty}_{x_0}$.
Were $f\in C^{k}_{x_0}$ for some $k>0$, we'd end up with $g_i\in C^{k-1}_{x_0}$, which is trouble for the derivation that follows. The intuitive reason is that $C^k$ derivations "don't know" how to act on $C^{k-1}$ derivations in general, so our results hold for the smooth case. Nonetheless, there are other ways to define tangent spaces for $C^k$ manifolds.
Moving on, let's prove the theorem.
Theorem
Let $M$ be a differentiable manifold, $p\in M$, then $\dim\mathrm{T}_p M=\dim M$
The idea of the proof is to show that for $M=\mathbb{R}^n$ and $x_0\in\mathbb{R}^n$, $\mathrm{T}_{x_0}\mathbb{R}^n$ coincides with the geometric notion of tangent space (which is $\mathbb{R}^n$ itself). Then we'll use the fact that arbitrary manifolds are locally diffeomorphic to $\mathbb{R}^n$.
Proof
Consider $M=\mathbb{R}^n$ and $U\subset\mathbb{R}^n$ open. Let $x_0\in\mathbb U$. Consider the map
$$\iota:\mathbb{R}^n\rightarrow\mathrm{T}_{x_0}\mathbb{R}^n\qquad \iota(v)=v^i\frac{\partial}{\partial x^i}\bigg\lvert_{x_0}\quad\forall v=(v^1, v^2... v^n)\in\mathbb{R}^n\tag{B}\label{B}$$
where the domain $\mathbb{R}^n$ is understood as the geometric notion of tangent space to $\mathbb{R}^n$ at $x_0$, which is $\mathbb{R}^n$ itself. We'll proceed by proving that \eqref{B} is a vector space isomorphism (it's obviously a linear map):
- Injectivity. Consider the coordinate functions $$x^i: U\rightarrow\mathbb{R} \qquad x=(x^1,... x^n)\mapsto x_i\quad i=1,...n.\tag{C}\label{C}$$
It suffices to prove that for a non-zero vector $v=(v^1, v^2... v^n)\in\mathbb{R}^n$, the image is non-zero (a linear map $f:V\rightarrow W$ is injective iff $f^{-1}(0_W)=0_V$). In that case, consider $v=(v^1, v^2... v^n)\neq0$, then
$$\iota(v)=v^i\frac{\partial}{\partial x^i}\bigg\lvert_{x_0}.$$
Now, a derivation is the zero derivation iff it is zero on every germ. But if we apply it to the coordinate functions \eqref{C}, very clearly:
$$\iota(v)(x^j)=v^i\frac{\partial}{\partial x^i}\bigg\lvert_{x_0}(x^j)=v^i\delta^j_i=v^j \quad j=1,...n.$$
Given that $v\neq0$, $\exists j\in{1,...n}$ such that $v^j\neq 0$ and thus the derivation $\iota(v)$ is non-zero and we have proved injectivity.
- Surjectivity. Now consider a derivation $D\in \mathrm{T}_{x_0}\mathbb{R}^n$, we will show that $\exists u\in\mathbb{R}^n$ such that $\iota(u)=D$. Consider again the coordinate functions \eqref{C} and define
$$a^i:=D(x^i).\tag{D}\label{D}$$
Clearly $a=(a^1,...a^n)\in\mathbb{R}^n$
Using the lemma above, locally for an arbitrary germ $f\in C^{\infty}_{x_0}$, $f(x)=f(x_0)+g_i(x)(x^i-x^i_0)$ using linearity and Leibniz rule
\begin{align}
D(f)&=D(f(x_0)+g_i(x)(x^i-x^i_0))=\underbrace{D((f(x_0))}_{=0}+D(g_i(x)(x^i-x^i_0))=\\
&=D(g_i(x))\underbrace{(x^i_0-x^i_0)}_{=0}+g_i(x_0)D(x^i-x^i_0)=g_i(x_0)D(x^i)-g_i(x_0)\underbrace{D(x^i_0)}_{=0}=\\
&=\frac{\partial f}{\partial x^i}\bigg\lvert_P D(x_i)=a^i\frac{\partial f}{\partial x^i}\bigg\lvert_P=a^i\frac{\partial}{\partial x^i}\bigg\lvert_P(f)=\iota(a)(f)
\end{align}
where I have used also the fact that derivations are zero acting on constant germs and are evaluated at $x_0$ and the second part of the lemma for $g_i$.
So, $D(f)=\iota(a)(f)$ for an arbitrary $f\in C^\infty_{x_0}$, which means that $D=\iota(a)$ and thus $w=a$ is the vector we were seeking.
So we've proved that $\mathbb{R}^n\simeq\mathrm{T}_{x_0}\mathbb{R}^n$.
Note that this isomorphism is natural, since $\mathbb{R}^n$ has a canonical basis.
To conclude the proof, we consider a generic manifold $M$. Let $(U, \varphi)\quad \varphi:U\overset{\sim}{\rightarrow}\varphi(U)$ be a local chart and $p\in U$. In particular $\varphi$ is a diffeomorphism and thus its differential at $p$
$$d\varphi_p: \mathrm{T}_p M\rightarrow \mathrm{T}_{\varphi(p)}\varphi(U)=\mathrm{T}_{\varphi(p)}\mathbb{R}^n.$$
is a vector space isomorphism, so $\mathrm{T}_p M\overset{d\varphi_p}{\simeq}\mathrm{T}_{\varphi(p)}\mathbb{R}^n\simeq\mathbb{R}^n$, which proves the theorem.
To conclude, note the the isomorphism is not natural as it depends on the choice of the chart. More practically, each chart induces a different basis of the tangent space which is identified with the canonical basis of $\mathbb{R}^n$ via its differential.