phase has been completely destroyed. We attribute the development of an unprecedentedly highTcsuperconductivity in Y-C system to the destructions of magnetism and the delocalization of interlayered anionic electrons under pressures. This work provides a unique example of pressure-induced collapse of magnetism at the onset of superconductivity in electride materials, along with the dramatic changes of electron-confinement topology in crystal lattices.