Well, you can't use a raw LED unless you actually know how to do electronic design around raw LEDs. They don't work like normal bulbs at all. Presumably you will use a pre-designed, pre-manufactured product which includes a lamp socket, electronics, heat sink, lens and LED emitters proper. These are consumer products and recommending them is off-topic here. (Nowhere on StackExchange recommends light products). However, those products will have a specification color temperature, CRI and lumens - just match and match. These products will take care of regulation for you. Most of them are using buck conversion to accept anything from 12V to 24V and possibly 30V or more. As such, surges of say, 24v won't bother them one bit.
If you have the electronics chops to "roll your own", then you pick the lowest battery voltage you ever expect to see, make your series LED string below that voltage (3 white LEDs, maybe 5-6 red ones) and then buck convert down to that voltage - or really, current, since LEDs like constant-current. You can make it as spike tolerant as you please.
However, there's a gotcha. If the lamp on the vehicle has a colored lens, what that lens does is destroy all lumens of light, except the lumens of light which are its color. So a red lens is destroying all light which isn't near red. That might be 70% of the total lumens made by a white light. However, it will be 0% of the total lumens made by a red LED!
So you have to be careful to not get a "lumen overload" by selecting a red LED of same lumens as the white light. That will give you 3-4 times the lumens you intended!
You must also be careful with lensing. The stock incandescent has the filament in a very specific place. The lensing and reflectors (typically Fresnel lenses) are designed to take spherical light from that place, and redirect the light to the correct location. If your make a ham-handed effort at LED substitution, the light source will be in the wrong place and it will not go properly through the lenses, resulting in light going to the wrong places and not to the right places. So it may be a great deal dimmer in the directions that matter.
Sometimes the reflector plays an important role. For instance, a classic "Golden Glow" headlamp makes almost all the directional "beam" using the reflector. An LED intended for Golden Glow might be entirely down-facing emitters aiming to bounce light off the reflector. Your LED doesn't need to make a full sphere of light, but you do need to make sure that it covers the right angles.