Measurements of the lightest open-charm baryon, , production can provide important information about the quark coalescence process of hadronization in the quark-gluon plasma (QGP). With strange quark yields being enhanced in the presence of the QGP medium, the production of is expected to be enhanced in heavy ion collisions if recombination plays an important role in the hadronization process. The high-luminosity data sets collected by the CMS experiment in 2018 have been used to measure production via in the range 3--30 GeV /c for pp collisions and 6--40 GeV /c for PbPb collisions in different centrality classes. The production is measured via the decay channel in the range 2--40 GeV /c in pp collisions and 6--40 GeV /c in PbPb collisions using the data sets collected by CMS detector in 2015. Results of the differential cross section of and , the ratios of and over yields in pp and PbPb collisions will be presented along with the nuclear modification factors.