By considering transition-metal (Shiba-Rusinov model) and rare-earth metal impurities (Abrikosov-Gorkov theory) effect on a many-body system, i.e., a BCS s-wave superconductor, quantum bipartite entanglement of two electrons of the Cooper pairs in terms of the exchange interaction, J, the potential scattering, V(playing an important role, unexpectedly), and the distance of two electron spins of the Cooper pair is calculated at zero temperature by using two-electron spin-space density matrix (Werner state). In transition-metal case, we find new quantum phase transitions (QPTs). The changes of J, which causes to have localized excited state, V and the pairing interaction (via energy gap) lead to the displacement of the QPTs (interactions act in the same direction, however sometimes the pairing interaction causes the competition with other interactions), regardless of their effects on the value of concurrence. Determining the allowable values of all interactions by itself is not possible, due to the smallness of the perturbed Green’s functions (appearing in the density matrix). For non-magnetic and magnetic (rare-earth) impurity cases, concurrence versus the distance and collision times is discussed for all finite and infinite Debye frequency. The quantum correlation, instability of the system and what's more important QPT can be tuned by the impurity.