Galvanic Electrochemical Cell Without half cells
This differs from the lemon galvanic cell (aka, 'battery') in several important ways: 1) Mg is used as the anode, rather than Zn, 2) there is no salt bridge, unlike in the the lemon cell, where the lemon serves as a crude 'salt bridge', and 3) the electrotyle is 2 M HCl rather than citric acid (and other stuff) in lemon juice. An open circuit voltage will be produced, easily measured with a digital multimeter in voltage input mode. A short circuit current will be produced, easily measured with a digital multimeter in current input mode. It may be possible to light a red LED, since they have low threshold voltage and low current requirements. I suspect it would light the red LED, though feebly.

But regardless of whether or not there is an external connection of the Mg and Cu electrodes, there will be a rapid redox reaction at the Mg electrode: $$\ce{Mg(s) + 2 H^+ &lt;=&gt; Mg^{2+} + H_2 (g)}$$

This unwanted competing redox reaction is the same as the net reaction obtained from the two relevant half cell reactions and it justs wastes some of the available energy as heat in the cell's vessel. So some electrical power is available by connecting an electrical load (e.g., red LED or resistor) between the two electrodes. But the parasitic oxidation of the Mg anode will continue until the electrode is consumed or the HCl is almost entirely consumed. (Magnesium will very slowly react with boiling water.)

Notes: 1. Clean copper, i.e., without surface compounds or so-called 'patina', does not react with 2 M HCl at room temperature. So the 2 M HCl does not contain any $\ce{Cu^+}$ or $\ce{Cu^{2+}}$ ions. 2. The reaction of Zn with 2 M HCl is considerably slower than is the reaction of Mg with 2 M HCl.

For more information, and at a much deeper level, see K. Schmidt-Rohr, "How Batteries Store and Release Energy: Explaining Basic Electrochemistry", Journal of Chemical Education, 95 (2018) 1801-1810.