The classical cooling-flow model of galaxy clusters fails in the absence of a non-gravitational heating mechanism needed to compensate for radiative cooling in the hot intra-cluster medium (ICM). Feedback from an active galactic nucleus (AGN) offset the cooling via the energy released from the bubbles inflated by radio jets launched from supermassive black holes (SMBH). However, it cannot completely offset the cooling as central cluster galaxies (BCGs) harbor a complex multiphase medium of extended warm and cold gas reservoirs, whose physical origin remains unknown. In the first part of this talk, I will present Atacama Large Millimeter Array (ALMA) and new Multi-Unit Spectroscopic Explorer (MUSE) observations of 15 central cluster galaxies to unveil the origin and life-cycle of these filamentary networks. In the second part of this talk, by extending the sample, including new MUSE observations of 15 central group galaxies (BGGs), I will explore the origin of the gas and the effect of AGN-feedback in the intermediate-mass range between individual galaxies and massive clusters.