It is mentioned rarely, but one of the hypothesis of validity for the LSZ reduction formula is that all the initial momenta must be different from all the final momenta, i.e, in a process in which m particles enter the process with momenta $p_1,...,p_m$ and n particles leave with momenta $k_1,...,k_n$, for the reduction formula to be valid we need that $p_i \neq k_j$ $\forall i,j$. Where do this condition enters in the derivation of the LSZ formula? Sadly, the full derivation it's full of technical and complicated notations, so I will only write here the bare minimum of the lines in which the condition $p_i \neq k_j$ $\forall i,j$ is used (for further details, you can refer to sections 2.2 and 2.3 of "Notes on Quantum field theory 1" by Marco Serone, which you can find online here https://userswww.pd.infn.it/~feruglio/Serone.pdf , or you could try to give a look at the english translation of the original article of Lehmann-Symanzik-Zimmermann, which you can find in a book indicated here Does somebody know where to find original paper of Lehmann, Symanzik and Zimmerman (LSZ) translated in English?). By the way, following Serone, if you want to calculate the amplitude
$_{out}<k_1,...,k_n|p_1,...,p_m>_{in}=_{out}<k_1,...,k_n|(a^\dagger_{p_1,in}-a^\dagger_{p_1,out})p_2,...,p_m>_{in}+_{out}<k_1,...,k_n|(a^\dagger_{p_1,out})p_2,...,p_m>_{in}$
and going on with the derivation, the first term gives the LSZ reduction formula, while the second term is zero because $a^\dagger_{p_1,out}$ can act directly on the vacuum on the left (being $p_1\neq k_j \forall j$, we have $[a^\dagger_{p_1,out},a_{k_j,out}]=0$). Precisely, $_{out}<k_1,...,k_n|a^\dagger_{p_1,out}=_{out}<0|a_{k_1,out}...a_{k_n,out}a^\dagger_{p_1,out}=_{out}<0|a^\dagger_{p_1,out}a_{k_1,out}...a_{k_n,out}=0$.
You may now think: "What this has to do with my question?". In your question, you are referring to Peskin book, which treats $2\rightarrow 2$ processes for a real scalar field with $\lambda\phi^4$ interaction: in this specific case, the only disconnected "subprocesses" you can get as Feynman diagrams are $1\rightarrow 1$ processes. If we want to apply the LSZ reduction formula to this type of $2\rightarrow 2$ processes, we need that the incoming/outgoing momenta satisfy the conditions $p_1,p_2\neq k_1,k_2$, so that "subprocesses" of the type $1\rightarrow 1$ are forbidden by momenta conservation (since each incoming momentum is different from every outgoing momenta), so that the corresponding disconnected diagrams gives zero contribution to the amplitude of the process.
Although the rule of considering only connected diagrams is valid for $2\rightarrow 2$ processes, for other processes involving a greater number of particles this rule may be not valid and you should also consider disconnected diagram to calculate the full amplitude of the process: the thing is that the contributions to the amplitude coming from disconnected diagram can be decomposed as the product of contributions coming from connected diagram of subprocceses $m_i\rightarrow n_i$ through the LSZ reduction formula (see clustering principle in Weinberg vol 1, chapter 4). This implies that the contributions to the amplitude of a $m\rightarrow n$ process come from connected diagrams of the process $m\rightarrow n$ itself and also from products of connected diagrams of every possible "subprocess" $m_i\rightarrow n_i$. In this way we can reduce the treatment of disconnected diagrams of a process to the treatment of the connected diagrams of subprocesses. In the end, it's worth to highlight that you can "divide" the complete Green function $G_{m\rightarrow n}$ (the one to which every Feynman diagram contributes) in a sum of a "connected" Green function $G^{conn.}_{m\rightarrow n}$ (the one to which only connected Feynman diagram contributes) and a "disconnected" Green function $G^{disconn.}_{m\rightarrow n}$, based on the representation of a Green function as a series of Feynman diagrams. In the LSZ reduction formula you can substitute $G^{conn.}_{m\rightarrow n}$ (instead of the complete $G_{m\rightarrow n}$) to obtain the contribution to the amplitude of the process coming only from the connected diagram/process (which is not the complete amplitude of the process, but still interesting). I know I've been sketchy but the topic is vast and I wish this gives you hint to clarify your doubts.