Let $\eta : \mathbb{S}^2 \setminus \{N\} \to \mathbb{R}^2 \times \{-1\} $ be the stereographic
projection from unit sphere to the plane $z = -1$ with respect to
the north pole $N = (0,0,1)$. i.e.
$$\eta: \mathbb{S}^2 \ni (x,y,z) \quad\mapsto\quad (u,v,-1) = \left(\frac{2x}{1-z},\frac{2y}{1-z},-1\right) \in \mathbb{R}^2 \times \{-1\}$$
Let $\gamma : (-\epsilon,\epsilon ) \to \mathbb{S}^2$ be any curve on the unit sphere parametrized by arc-length $s$.
For any point $\gamma(s)$ on $\gamma$, we have
$$
\begin{cases}
u' &= \frac{2x'}{1-z} + \frac{2xz'}{(1-z)^2}\\
v' &= \frac{2y'}{1-z} + \frac{2yz'}{(1-z)^2}
\end{cases}
\quad\implies\quad
\sqrt{u'^2 + v'^2} = \frac{2}{1-z}
$$
This means the unit tangent vector for the image of $\gamma$ under $\eta$ is simply
$$\left( x' + \frac{xz'}{1-z}, y' + \frac{yz'}{1-z}\right)$$
One the plane, a straight line is characterized by having a constant unit tangent vector. In order for $\eta\circ\gamma$ to be a straight line, $\gamma$ need to satisfy:
$$
\begin{align}
\frac{d}{ds}\left(x' + \frac{xz'}{1-z}\right) &= 0\\
\frac{d}{ds}\left(y' + \frac{yz'}{1-z}\right) &= 0
\end{align}
$$
Conversely, if $(x(s),y(s),z(s))$ is a solution of this ODE on $\mathbb{S}^2$,
there will be constants $a, b$ such that
$$\begin{cases}
x' + \frac{xz'}{1-z} &= -b\\
y' + \frac{yz'}{1-z} &= a\\
\end{cases}
\quad\implies\quad
\phi' + \frac{\phi z'}{1-z} = 0
\quad\iff\quad
\left(\frac{\phi}{1-z}\right)' = 0
$$
where $\phi = ax+by$. This means there is another constant $c$ such that
$$\frac{\phi}{1-z} = c \quad\iff\quad ax+by + c(z-1) = 0$$
This is the equation for a plane through $N$ and this solution of ODE
lies on the intersection of this plane and the unit sphere (i.e a circle)
containing $N$.