A small experiment with a potentiometer. I used an Arduino as a battery (5 volts + ground). The LED glowed brighter, brighter, brighter, until … the excess voltage was “eaten” by a 220-ohm resistor. The LED did not burn out. Thanks God! I have an LED. ))
You can manage amount of amperage by adjusting potentiometer. But important notice! If you do not want to burn your LED use resistor for 220 Ohm in the circuit as you can see on the picture.
Arduino 5V -> cable -> resistor -> LED (Anode first) -> potentiometer -> cable -> Arduino ground (GND).