  Uniaxial pressure provides an efficient approach to control the competition
between charge density waves (CDWs) and superconductivity in underdoped
YBa$_{2}$Cu$_{3}$O$_{\rm{y}}$. It can enhance the correlation volume of
ubiquitous short-range 2D CDW correlations, and induces a long-range 3D CDW
otherwise only accessible at large magnetic fields. Here, we use x-ray
diffraction to study the strain and doping evolution of these CDWs. No
signatures of discommensurations nor pair density waves are observed in the
investigated strain-temperature parameter space, but direct evidence for a form
of competition between 2D and 3D CDWs is uncovered. We show that the interplay
between the 3D CDW, the 2D CDWs and superconductivity is qualitatively well
described by including strain effects in simulations of a nonlinear sigma model
of competing superconducting and CDW orders. From a broader perspective, our
results underscore the potential of strain tuning as a powerful tool for
probing and manipulating competing orders in quantum materials.
