You get a separate ODE for every integral curve (which you denote by $\gamma$) of the vector field $X$.
The space $\mathbb R^4$ is a disjoint union of these integral curves.
Each ODE is of order one, so you need to fix the value of $f$ at exactly one point from every integral curve.
(Alternatively, you could also take asymptotic behaviour on each integral curve as a boundary condition.)
You can fix the values on a three dimensional surface that meets every integral curve exactly once, provided such a surface exists.
A good choice for such a surface or a collection of such surfaces depends on the vector field $X$.