That is not really an apples-to-apples comparison. One thing to note is the age of the combustion-engine cars compared to the electric cars which are usually rather new, as well as EVs usually not being operated in similar environments and in similar ways which might make combustion-engine cars more prone to catch fire.
Another thing to note is that combustion-engine vehicles rarely spontaneously catch fire, usually it takes some form of of triggering event that provides a spark, an increase in pressure, or vaporization of the fuel. Batteries, however, can have thermal runaway events that are started by less obvious causes and remain unnoticed until they result in combustion or explosion. Those fires are also much more dangerous due to the toxic fumes and are harder to extinguish.
That being said, battery technology is being improved every day and new technologies are constantly in development. Solid-state batteries, for example, would likely reduce the risk of fires to practically zero.
Remember that EVs catch fire less often than cars using explosives to run. About 5x less likely by rough numbers
https://driveelectriccolorado.org/myth-buster-evs-fire/
That is not really an apples-to-apples comparison. One thing to note is the age of the combustion-engine cars compared to the electric cars which are usually rather new, as well as EVs usually not being operated in similar environments and in similar ways which might make combustion-engine cars more prone to catch fire.
Another thing to note is that combustion-engine vehicles rarely spontaneously catch fire, usually it takes some form of of triggering event that provides a spark, an increase in pressure, or vaporization of the fuel. Batteries, however, can have thermal runaway events that are started by less obvious causes and remain unnoticed until they result in combustion or explosion. Those fires are also much more dangerous due to the toxic fumes and are harder to extinguish.
That being said, battery technology is being improved every day and new technologies are constantly in development. Solid-state batteries, for example, would likely reduce the risk of fires to practically zero.