Due to the physical circumstances, the current flowing through the LED must be limited by additional components. There are various solution approaches.
The simplest control of a light emitting diode is the operation with a series resistor. So that an approximately constant current can be ensured in the light emitting diode, it requires a supply voltage, which behaves very stable even under load.
Typically, this simple type of control is used only with low power light emitting diodes. In light-emitting diodes in the 1 watt range or larger, the power dissipation on the resistor would be too large.
An alternative to the simple series resistor are linear regulators. By the variable resistors, a constant current can be ensured in the light emitting diodes, even if the input voltage fluctuates, or the voltage drop across the light emitting diode is changed by warming.
However, even with this solution the power loss, that results from the difference between the supply voltage and the voltage drop across the light emitting diode, is converted into heat.