How to construct an invariant Lagrangian under a Lie group $G$ generally? For example, if we have $SO(5)$'s generators which are constructed by some operators, then the question is that: is it possible to find a invariant Lagrangian under the $SO(5)$ generally ?
The general recipe for such a construction was created by Sidney Coleman and his collaborators way back in 1969, in two epoch making Physical Review papers. (PROLA says the official citation count of first one stands at about 1000.) That recipe is being used even today to construct Lagrangians invariant under Lie Groups, for example, in the chiral effective field theories (where $G \equiv SU(3)_L \times SU(3)_R$).
S. Coleman, J. Wess and B. Zumino, Phys. Rev. 177, 2239 (1969).
C. G. Callan, S. Coleman, J. Wess and B. Zumino, Phys. Rev. 177, 2247 (1969).
There is also an alternative strategy devised by Weinberg, which you can find cited in these papers, but my personal opinion is that, Weinberg is almost always too difficult for a first reading.
Happy Learning :)