If you are unfamiliar with this formalism, consult, for example, Goldstein (1977) or work through the example given in Sakurai (1967), page 3.
Instead of writing down a relativistic wave equation, we simply choose a Lagrangian $\mathcal{L}$. Provided our choice is a Lorentz scalar, the equation of motion resulting from (14.4) will be covariant. For example, substituting the Lagrangian
$$
\mathcal{L}=\frac{1}{2}\left(\partial_\mu \phi\right)\left(\partial^\mu \phi\right)-\frac{1}{2} m^2 \phi^2
$$
into (14.4) gives the Klein-Gordon equation
$$
\partial_\mu \partial^\mu \phi+m^2 \phi=\left(\square^2+m^2\right) \phi=0 .
$$
There is no mystery here. The choice of $\mathcal{L}$ was specifically designed to reproduce (14.7).