A couple of questions on the 2N2222 transistor

Try to find a good datasheet, with lots of data. Some datasheets are very short.

The voltage drop over the transistor is perhaps only 0.1 or 0.2 V at 20mA.
But the led has a voltage drop of 1.4 ... 3V. That depends on the color. Light-emitting diode - Wikipedia

If you want the transistor to be fully on, use about 30% more current through the base than needed.

Suppose the led has a voltage drop of 2V. 3V/20mA = 150 Ohm.
The current gain with Ic at 20mA is about 70. 20mA / 70 = 0.29mA. Add 30% makes 0.37mA.

For safety I assume that the output of the Arduino is 4.5V and the base about 0.7V. 4.5-0.7 = 3.8V
3.8V / 0.37mA = 10k

So 10k would do the job, and 4k7 doubles the base current to be sure. It doesn't hurt the 2N2222.