  The production of heavy quarks (charm and beauty) provides unique insights
into the transport properties of the Quark-Gluon Plasma (QGP) in heavy-ion
collisions. Experimentally, the nuclear modification factor ${{R}_{\rm AA}}$
and the azimuthal anisotropy coefficient ${v}_{\rm 2}$ of heavy-flavor mesons
are powerful observables to study the medium-related effects, such as energy
loss and collectivity, on the heavy quark propagation through the QGP
evolution. The latest measurements of the prompt and non-prompt open
heavy-flavor hadrons allow a systematic comparison of the transport behaviors
probed by charm and beauty quarks. In this work we make such an attempt
utilizing our recently developed framework. By performing a quantitative
investigation of ${{R}_{\rm AA}}$ and ${v}_{\rm 2}$, it is found that both
charm and beauty quarks are efficient probes to capture the dynamical features
of QGP, in particular the resulting mass hierarchy for the energy loss and
azimuthal anisotropy, which are well inherited by the various $D/B$-meson
species. Moreover, our calculations can describe simultaneously ${{R}_{\rm
AA}}$ and ${v}_{\rm 2}$ data for the prompt and non-prompt $D^{0}$ mesons in
central ($0-10\%$) and semi-central ($30-50\%$) Pb--Pb collisions at
$\sqrt{s_{\rm NN}}=5.02~{\rm TeV}$. The predictions for $B$-meson observables
for upcoming experimental tests are also made down to the low momentum region.
