One approach to construct the Levi-Civita connection for a surface $S \subseteq \mathbb{R}^3$ is to construct the connection first for $\mathbb{R}^3$ and then apply a suitable orthogonal projection to get the connection for $S$. This approach is for example discussed in the textbooks "Notes on Differential Geometry" by Hicks and "Manifolds and Differential Geometry" by Lee. One step in this construction consists of applying the Levi-Civita connection for $\mathbb{R}^3$ to vector fields of the surface $S$. My question is why this is possible.
I'll try to explain this in some detail:
Let $X,Y$ be vector fields on $\mathbb{R}^3$, i.e. smooth mappings $X,Y:\mathbb{R}^3 \to \mathbb{R}^3$. Write $Y=(Y_1,Y_2,Y_3)$ where $Y_i:\mathbb{R}^3 \to \mathbb{R}$. Define the vector field $D_X Y$ by $$(D_X Y)(p)=\bigl((D_{X_p} Y_1)(p),(D_{X_p} Y_2)(p),(D_{X_p} Y_3)(p)\bigr),\phantom{aaa} p \in \mathbb{R}^3,$$ where $(D_{X_p} Y_i)(p)$ is the derivation of $Y_i$ in direction of the vector $X_p$ at point $p$, i.e. $$(D_{X_p} Y_i)(p)=X_p \cdot \text{grad }Y_i(p)$$ The Levi-Civita connection for $\mathbb{R}^3$ is then denoted by $D$ and defined via $$D: \ (X,Y) \mapsto D_X Y,\phantom{aaa}X,Y\text{ vector fiels on }\mathbb{R}^3.$$
My problem arises when this is used to define the Levi-Civita connection for a surface $S \subseteq \mathbb{R}^3$. Denote this connection by $\nabla$. For two vector fields $X,Y$ on $S$, the basic idea seems to be to define the vector field $\nabla_X Y$ by $$(\nabla_X Y)(p)=\text{ orthogonal projection of }(D_X Y)(p)\text{ to }T_p S,\phantom{aaa}p \in S$$ Question 1: In the above definition of $\nabla_X Y$, how can we apply $D_X$ to $Y$? My problem is that $Y$ is defined on $S$ and since $S$ is in general not open in $\mathbb{R}^3$, we can not differentiate $Y$ in order to get the directional derivatives. To put it otherwise: $D$ is only defined for vector fields on $\mathbb{R}^3$ but not for vector fields on $S$.
The authors of the textbooks I mentioned seem to suggest that this is somehow possible because $D_X Y$ can also be expressed via curves in the following way: If $X,Y$ are vector fields on $\mathbb{R}^3$ and if $\gamma:(-\epsilon,\epsilon) \to \mathbb{R }^3$ is a smooth curve with $\gamma(0)=p$ and $\gamma'(0)=X_p$, then $$(D_X Y)(p)=(Y\circ \gamma)'(0)$$ I understand this part but I don't know how this could help in applying $D$ to vector fields of $S$. My only idea so far would be that we use the above equation as a definition for $D$ applied to vector fields on $S$ but then I am not able to show that this is independent of the curve $\gamma$. I can also make a second question out this idea:
Question 2: Let $S \subseteq \mathbb{R}^3$ be surface and $Y$ a vector field on $S$. Let $\gamma$ and $\tau$ be curves in $S$ with $\gamma(0)=\tau(0)$ and $\gamma'(0)=\tau'(0)$. Is it true that $$(Y\circ \gamma)'(0)=(Y \circ \tau)'(0)?$$