You cite the most general formula for the S-matrix. Of course it is correct.
In order to make use of this formula, i.e. order to compute cross sections one has to compute matrix elements of S. This is a very complicated process.
In particular at this stage we don't know what a Feynman diagram is.
Above all we have not yet defined what is an in-going particle.
In a Feynman diagram an in-going particle is typically symbolized by an external line. But this particle is actually a non-interacting particle. But the interaction cannot be neglected in an interacting QFT (non-interacting QFT are just of no real interest except by filling the first 50 pages of QFT textbooks as preparation for interacting QFTs). So the in-going and out-going particles and their respective states have to be considered as interacting particle states.
Actually the Gellman-Low Theorem only relates interacting particle states -- above all the vacuum state --- with
with non-interacting particle states. It is not related with the S-matrix definition.
However, for a correct computation of S-matrix elements one has to use interacting particle (in particular also vacuum) states. However, it is a-priori unknown how to evaluate such matrix elements. However, the Gellman-Low Theorem offers a possibility to compute matrix elements between interacting particle (in particular also vacuum) states out of matrix elements of non-interacting particle states which are well-known from non-interacting QFT
(see for instance development of Klein-Gordon or Dirac-fields in creation and annihilation operators and the application of creation operators on the vacuum state and particle states).
The LSZ-formula relates S-matrix elements with vacuum expectancy values of products of field operators which we know to express with Feynman diagrams via the Gellmann Low Theorem and other stuff:
$\langle \Omega | \phi(x_1)\phi(x_2)\ldots \phi(x_n)|\Omega\rangle$
Actually, the LSZ-formula is the essence of a Quantum Field Theory since it provides a "rather" simple procedure of how to compute S-matrix elements taking into account that the quantum states involved are actually all interacting (in order to make it clear: there is no simple formula for an interacting vacuum or particle state -- that only exists for non-interacting particle states). So in the process of computing a S-matrix element, i.e. $S$ sandwiched between for instance between to interacting 2-particle states
$\langle p_1 p_2 | S | q_1 q_2\rangle$
many "tricks" have to be applied in which for instance a large amount of Feynman diagrams (in particular all the vacuum bubbles) just get cancelled out, so at the end one is left with just amputated Feynman diagrams multiplied by appropiate factors in order to compute a S-matrix elements between 2 interacting particle states.
The mentioned tricks fill up typically 100 pages of QFT books, so it is worth while to read them.