In this paper we present two studies made by the CMS Collaboration.
The first is the CMS measurement of prompt $D^{*+}$, $D^{+}$ and $D^{0}$ production cross sections at $\sqrt{s}=$ 13 TeV. The second one corresponds to the first observation of the $B_s^0 \to X(3872) \phi$ decay and the measurement of its branching fraction. The value obtained for the $B_s^0$ branching fraction is consistent with that of $B^0$ but smaller by a factor of two when compared with the same measurement for $B^+$, indicating the difference in the production dynamics of X(3872) in $B_s^0$ and $B^+$ decays.