  Charge-density wave order is now understood to be a widespread feature of
underdoped cuprate high-temperature superconductors, although its origins
remain unclear. While experiments suggest that the charge-ordering wavevector
is determined by Fermi-surface nesting, the relevant sections of the Fermi
surface are featureless and provide no clue as to the underlying mechanism.
Here, focusing on underdoped YBa$_2$Cu$_3$O$_{6+x}$, we propose a scenario that
traces the charge-density wave formation to the incipient softening of a
bond-buckling phonon. The momentum dependence of its coupling to the electrons
in the copper-oxygen planes favourably selects the incommensurate and axial
ordering wavevector found in experiments. But, it requires strong electronic
correlations via their cuprate-specific renormalization of the weight and the
dispersion of quasiparticles to enable a unique enhancement of the charge
susceptibility near the B$_{1g}$-phonon selected wavevector. The frequency of
the B$_{1g}$ phonon softens by a few percent, and a lattice instability with
concomitant finite-range charge-density wave correlations will form locally, if
nucleated by defects or dopant disorder. These results offer the perspective
that the complex phase diagram of underdoped cuprates cannot be understood in
the context of strong electronic correlations alone.
