Yes when replacing ignition coils you should replace all ignition coils at once for the best results to keep your engine running smooth.
However if all you can afford at the time is to replace only the bad one then that's fine as well but eventually you should replace the other ignition coils.
Most times ignition coils fail on cars and trucks and other vehicles as a result of age and the heat produced by the engine.
Overtime after so much heat build up from the engine bay the heat gets to the coils and eventually degrades and dries out the insulation that is wrapped around the wires inside the ignition coils.
This degrading insulation in the ignition coils eventually leads to the shorting out of the winding's in the ignition coils which then causes electrical shorts in the ignition coils.
That causes the engine to get misfires on the cylinders and leads to engine performance issues.
Ignition coils usually last for 100,000 miles or more sometimes but it's a good idea to replace them after 100,000 miles when you get an ignition tuneup.
When replacing ignition coils it's best to replace them all at once so your engine runs smooth as when one or two ignition coils fail the others will soon.
Some vehicles have one ignition coil while others have an ignition coil for all cylinders.
So if your engine has 6 cylinders then your car or truck will have 6 ignition coils and if your vehicle has 8 cylinders then the vehicle will have 8 ignition coils.