  Young star clusters are likely the most common birthplace of massive stars
across cosmic time and influence the formation of compact binaries in several
ways. Here, we simulate the formation of black hole -- neutron star binaries
(BHNSs) in young star clusters, by means of the binary population synthesis
code \texttt{MOBSE} interfaced with the $N$-body code \texttt{NBODY6++GPU}.
BHNSs formed in young star clusters (dynamical BHNSs) are significantly more
massive than BHNSs formed from isolated binaries (isolated BHNSs):
$\sim{}40$~\% of the dynamical BHNS mergers have total mass $>15$ M$_\odot$,
while only $\sim{}0.01$~\% of the isolated BHNS mergers have mass in excess of
this value. Hence, our models strongly support a dynamical formation scenario
for GW190814, given its total mass $\sim{}26$ M$_\odot$, if this event is a
BHNS merger. All our dynamical BHNSs are ejected from their parent star cluster
before they reach coalescence. Thus, a significant fraction of BHNS mergers
occurring in the field might have originated in a young star cluster. The mass
spectrum of BHNS mergers from gravitational-wave detections will provide a clue
to differentiate between dynamical and isolated formation of BHNSs.
