In above Figure an inertial system $\:\mathrm S'\:$ is translated with respect to the inertial system $\:\mathrm S\:$ with constant velocity
\begin{equation}
\boldsymbol{\upsilon}=\left(\upsilon_{1},\upsilon_{2},\upsilon_{3}\right)=\left(\upsilon \mathrm n_{1},\upsilon \mathrm n_{2},\upsilon \mathrm n_{3}\right)=\upsilon \mathbf n\,, \qquad \upsilon \in \left(-c,c\right)
\tag{01}
\end{equation}
The Lorentz transformation in difference form is
\begin{align}
\Delta t^{\boldsymbol{\prime}} & = \gamma\left(\Delta t-\dfrac{\boldsymbol{\upsilon}\boldsymbol{\cdot} \Delta \mathbf{x}}{c^{2}}\right)
\tag{02a}\\
\Delta \mathbf{x}^{\boldsymbol{\prime}} & = \Delta \mathbf{x}+(\gamma-1)(\mathbf{n}\boldsymbol{\cdot} \Delta \mathbf{x})\mathbf{n}-\gamma \boldsymbol{\upsilon}\Delta t
\tag{02b}
\end{align}
Now, let a plane $\:\mathrm p\:$ in $\:\mathrm S\:$ normal to the velocity $\:\boldsymbol{\upsilon}\:$, as in Figure, and let two events
\begin{align}
\mathbf{Event_1} & = \left(\mathbf{x_1},t_1\right)
\tag{03a}\\
\mathbf{Event_2} & = \left(\mathbf{x_2},t_2\right)
\tag{03b}
\end{align}
both happening on the plane $\:\mathrm p\:$ apart in space by the 3-vector $\:\Delta\mathbf{x}=\mathbf{x_2}-\mathbf{x_1}\:$ and at time apart by $\:\Delta t=t_2-t_1$. Then
\begin{equation}
\Delta\mathbf{x}\in \mathrm p \quad \Longrightarrow \quad \Delta\mathbf{x}\boldsymbol{\perp}\boldsymbol{\upsilon}\quad \Longrightarrow \quad \boldsymbol{\upsilon}\boldsymbol{\cdot} \Delta \mathbf{x}=0 \quad \overset{(02a)}{=\!=\!\Longrightarrow} \quad \Delta t^{\boldsymbol{\prime}} = \gamma\,\Delta t
\tag{04}
\end{equation}
that is the case of time dilation
\begin{equation}
\Delta t^{\boldsymbol{\prime}} = \gamma\,\Delta t=\dfrac{\Delta t}{\sqrt{1-\dfrac{\upsilon^2}{c^2}}}
\tag{05}
\end{equation}
The time dilation equation is valid of course in case that the two events happen at the same point in space, that is $\:\Delta\mathbf{x}=\mathbf{x_2}-\mathbf{x_1}=\boldsymbol{0}$.
So
Time dilation requires events to occur at the same point in space ($\:\Delta\mathbf{x}=\mathbf{x_2}-\mathbf{x_1}=\boldsymbol{0}$) or on a plane normal to the velocity vector ($\:\boldsymbol{\upsilon}\boldsymbol{\cdot} \Delta \mathbf{x}=0$).