  Measurements of quarkonia (heavy quark and antiquark bound states) and
open-heavy flavour hadrons in hadronic collisions provide a unique testing
ground for understanding quantum chromodynamics (QCD). Although recently there
was significant progress, our understanding of hadronic collisions has been
challenged by the observation of intriguing effects in high-multiplicity
proton-proton (pp) and p-Pb collisions, such as collective phenomena. The
excellent particle identification, track and decay-vertex reconstruction
capabilities of the ALICE experiment are exploited to measure quarkonia as well
as open-heavy flavour hadron production at midrapidity while quarkonium
measurements are inclusive at forward rapidity. In this contribution, the first
measurements of the elliptic flow ($v_2$) of $J/\psi$ in high multiplicity pp
collisions is shown. New measurements of quarkonium and open-beauty hadron
production in pp and p-Pb collisions are presented, such as the first
measurement of the non-prompt $\text{D}^{*+}$ polarization in pp collisions at
$\sqrt{s}=13$ TeV. The comparison of results with available models is also
discussed.
