In Lee's book about Riemannian manifolds, I read
We want to think of a geodesic as a curve in $M$ that is “as straight as possible.” An intuitively plausible way to measure straightness is to compute the Euclidean acceleration $\ddot{γ}(t)$ as usual, and orthogonally project $\ddot{γ}(t)$ onto the tangent space $T_{γ(t)}M$. This yields a vector $\ddot{γ}(t)^{T}$ tangent to $M$, the tangential acceleration of $γ$. We could then define a geodesic as a curve in $M$ whose tangential acceleration is zero.
For me this is not so intuitive since a straight line in the Euclidean space can have tangential acceleration other than $0$. I would intuitively say that the orthogonal acceleration should be $0$. There is something I don't understand here.
Because, at the end of the day, a geodesic is not really a straight line, even in Euclidean space. A geodesic is something more than that.
Take your example: the set of $$ \{ (t^2, 0,0) : t\in [0,1]\}$$ is a portion of a straight line, but the mapping $\gamma : [0,1]\to \mathbb R^3$, $\gamma(t) = (t^2, 0,0)$ is not a geodesic.
The definition of geodesics in $\mathbb R^3$ is that there is no acceleration: that is, $\gamma '' =0$. The by-product is that (1) the image is a straight line, and (2) it is the shortest curve joining any two points.
In general, a curve $\gamma$ in $M$ (a submanifold in Euclidean space) is a geodesic if and only if $(\gamma'')^\top = 0$.
You might not like this definition since it does not correspond to the geometric object (straight line) but rather a mapping. But object defined in terms of mapping (instead of subsets) are much convenient to work with, since it has extra structure.
Another highly related post here