How to prove that in the new Hamiltonian, which is formed by any of the generator function will not contain $Q$ (transformed from $q$)? I.e. new Hamiltonian will only be a function of $P$ (transformed from $p$).
For each given hamiltonian $H$, this will only happen for a few, rather special, canonical transformations. As pppqqq points out, having $H$ not depend on $Q$ implies that $\dot P=0$ and hence $P$ is a constant of the motion. To put this differently, it means that the property you want will only happen when the momenta you transform into are some of the (rather few) constants of the motion.
Moreover, once you have such a transformation, you've essentially solved away all the dynamics, because you have enough constants of the motion to completely specify the system's trajectory given the initial conditions. Thus, in texts where this sort of transformation is considered, the emphasis is not in proving that a generic canonical transformation can do this (which it can't) but in finding the ones that do. And once you find them, you've solved your dynamics.