In this study, we performed a systematic analysis of the multiplicity dependence of hadron production at mid-rapidity ( \(|y|<0.5\) ), ranging from the light to the charm sector in proton–proton (pp) collisions at \(\sqrt{s}={13}\,\text {TeV}\) . This study used a multi-phase transport (AMPT) model coupled with PYTHIA8 initial conditions. We investigated the baryon-to-meson and the strange-to-non-strange meson ratios varying with the charged particle density. By tuning the coalescence parameters, the AMPT model provides a reasonable description of the experimental data for the inclusive production of both light and charm hadrons, comparable to the string fragmentation model calculations with color reconnection effects. Additionally, we analyzed the relative production of hadrons by examining the self-normalized particle ratios as a function of the charged hadron density. Our findings suggest that parton evolution effects and the coalescence hadronization process in the AMPT model result in a strong flavor hierarchy in the multiplicity dependence of the baryon-to-meson ratio. Furthermore, our investigation of the \(p_\text {T}\) differential double ratio of the baryon-to-meson fraction between high- and low-multiplicity events revealed distinct modifications to the flavor associated baryon-to-meson ratio \(p_\text {T}\) shape in high-multiplicity events when comparing the coalescence hadronization model to the color reconnection model. These observations highlight the importance of understanding the hadronization process in high-energy pp collisions through comprehensive multiplicity-dependent multi-flavor analysis.