Wouldn't using a resistor value of 500Ω cause a voltage drop across
the resistor of 9V, leaving the LED dark because no potential
difference is left?
That would be correct if the current was 0.018A but it won't be.
LEDs (and diodes in general) are a little odd. For a start they don't follow Ohms law, that only applies to passive devices (Resistors and for AC signals capacitors and inductors).
As a first approximation a diode can be modeled as allowing no current to pass if the voltage is less that its on threshold voltage and allowing an unlimited current to pass once over that threshold. It's sort of the electronics equivalent of a dam, if the water level is below the top of the dam all the water is stopped. But any water that is over the top of the dam can flow as fast as it likes.
This isn't quite correct, in reality there is a small switch on region where the voltage / current relationship in the diode transitions from being zero current to almost unrestricted current, but this is close enough for most basic circuit analysis.
So in this case the circuit you end up with is:
+9V -- 500R -- LED -- 0V
If the current was 0.018A then there would be 9V over the resistor leaving 0V for the LED. The LED is not at its threshold voltage and so no current flows. But current can't just vanish, for a series circuit like this it must be the same at all points. Clearly the current in the resistor can't be 0.018A.
Similarly if the current in the resistor was 0 or close to it then the voltage on the resistor would be close to 0 and the voltage on the LED would be 9V. But anything over the threshold and the LED doesn't restrict current flow so we have unlimited current flowing. Again we have an inconsistency so this can't be correct.
As should hopefully be clear by this point the the only way we will get things to balance is if the voltage over the LED is exactly at the threshold voltage. That way the LED is allowing current to flow but we don't end up with an infinite current requirement. The LED is operating within that small switch on region, where exactly within the region doesn't matter for something like.
If the LED is at the threshold this means the LED voltage is 2V leaving 7V over the resistor. 7V and 500 ohms means a current of 0.014A.
The maximum current for an LED (and most diodes) is mainly for thermal reasons. The power used by the LED will be the voltage drop * the current. Only a tiny amount of that will be turned into light, the bulk of it will be converted into heat. Too much current and you get too much heat and things go bang.