You have 2 things to fight.
1. Voltage spikes that go higher then the ignition can handle.
This is solved by installing a metal oxide varistor between power in and ground.
The mov is passive until the clamping voltage is reached.
Select clamping voltage to fit aplication 6/12v.
2. Stray frequencys.
Noise coming from ignition and generators.
A choke coil lets DC current pass and filters away AC frequencys.
Noise filters for car audio is cheap