  The generalized Tur\'an number $\mathrm{ex}(n,H,F)$ is the largest number of
copies of $H$ in $n$-vertex $F$-free graphs. We denote by $tF$ the
vertex-disjoint union of $t$ copies of $F$. Gerbner, Methuku and Vizer in 2019
determined the order of magnitude of $\mathrm{ex}(n,K_s,tK_r)$. We extend this
result in three directions. First, we determine $\mathrm{ex}(n,K_s,tK_r)$
exactly for sufficiently large $n$. Second, we determine the asymptotics of the
analogous number for $p$-uniform hypergraphs. Third, we determine the order of
magnitude of $\mathrm{ex}(n,H,tK_r)$ for every graph $H$, and also of the
analogous number for $p$-uniform hypergraphs.
