The discovery of the Higgs boson ten years ago and successful measurement of the Higgs boson couplings to third generation fermions by ATLAS and CMS mark great milestones for HEP. The much weaker coupling to the second generation quarks predicted by the SM makes the measurement of the Higgs-charm coupling much more challenging. With the full run-2 data collected by the CMS experiment, a lot of progress has been made to constrain this coupling. In this talk, we present the latest results of direct and indirect measurements of the HIggs-charm coupling by the CMS experiment. Prospects for future improvements are also given.