Ab initio quantum many-body description of superconducting trends in the cuprates