Distinction between Lie Algebra of differentiable manifolds and Lie Algebra of Lie Group

The Lie algebra of all vector fields defined on a manifold is infinite-dimensional. In the case of a $n$-dimensional Lie group $G$, we define its Lie algebra as the Lie algebra $\mathfrak g$ of all left-invariant vector fields because then we then get a $n$-dimensional Lie algebra. And because then the Lie algebra structure of $\mathfrak g$ has something to do with the group structure on $G$.