So I know that the dual space is the set of all linear transformations that map a vector from a vector space to the field of the space itself (the real number line, complex, quaternions). From YouTube I saw that you can use the metric tensor to go from the vector space to the dual space.I have two questions about this. Why do we use the metric tensor as a map (don't we define tensors by the fact that they are invariant under general Lorentz transformations? And if this is the case that the metric tensor acts as a mapping from the vector space to the dual space then does this mapping specify the linear combination of the dual basis in terms of original basis?
The vector space and its dual space are isomorphic. We can "identify" the spaces with any mapping (given the properties of the mapping are "nice" enaugh, like being 1-1). But they are not cannocically isomorphic, because there is no reason to prefer one mapping over another. In metric space, the metric is distinguished among all the existing mappings and thus we can use this mapping to build canonical isomorphism.
Metric tensor (or any tensor for that matter) is simply linear map from all the vectors and dual spaces into real numbers. So if we have vector space $V$ and dual space $V^*$, tensor $T^2_3$ is a linear map from $V^*\times V ^*\times V \times V\times V \rightarrow R$.
Notice that if you don't insert some of the vectors, you get linear map that waits for those vectors. If you dont insert one vector into metric, which is linear map $V\times V \rightarrow R$, you get linear map that waits for that vector to produce number, so $g(-,v)$ where g is metric and v vector in V, you get linear map from $V\rightarrow R$ which is exactly what dual space is.
To construct isomorphism between vector space and its dual, use prescription $(e^*)^i=g(-,e_i)$. But then the condition $(e^*)^i(e_j)=\delta_j^i$ for dual basis is not satisfied, because for timelike basis vector the norm gives $-1$.
Now the advantage of this identifiaction is in the fact that the dual vectors are not just random linear map of vector space, its the scalar product.
EDIT to further explain the connection between dual vectors, metric and lorentz transformation:
For any basis $e_i$ in $V$ we have dual basis $e^i$ given by the relation $e^i(e_j)=\delta^i_j$. This defines the isomorphism (map that identifies the two vector spaces) between $V$ and $V^*$. When we choose different basis in V, we get another dual basis and this also defines some isomorphism between $V$ and $V^*$. It can be shown that the two isomorphisms are not in general the same. That is, if first isomorphism creates identification $v_1 \leftrightarrow v^2$ where $v_1 \in V, v^2 \in V^*$, the second isomorphism will in general identify the same vector $v_1$ with different vector $v^3 \in V^*; v^3\ne v^2$.
So there is no natural way to associate vector $v_i \in V$ with some vector of dual space.
But if we have metric, we can fix isomorphism with already given prescription $(e^*)^i=g(-,e_i)$. Then, as i already pointed out, the linear map $v^i(v_j)=g(v_i,v_j)$ gives you the scalar product of vector $v_j \in V$ and vector $v_i \in V$ associated with the $v^i \in V^*$.
But since the scalar product in relativity is invariant under lorentz transformations (we can choose only such kind of metrics, otherwise they can't be physically meaningfull), this way of identifying $V$ and $V^*$ is also lorentz invariant and gives you great benefits.
EDIT 2, correction
I made a mistake: prescription $(e^*)^i=g(-,e_i)$ does not lead to $(e^*)^i(e_j)\equiv g(e_j,e_i) = \delta^i_j$, because f.e. $g(e_t,e_t) =-1$ in minkowski. So in fact, there is no orthonormal basis in GR as i wrote, because you cannot normalize timelike/null vectors to $1$ (in metric with signature -+++). There is only orthogonal basis, not orthonormal.
The corrections are written in italic.