Glow plugs aren't magical, but they aren't needed for a diesel engine to create combustion, they are just used to keep it warm to avoid the problem of cold starts.
Diesel fuel has a lower (and more even) ignition point, so compression alone can be used to sustain the engine's cycle. Temperature affects that point though, hence the glow pugs. You could do this with a gasoline powered engine, but it's easier to just use well timed sparks to do so due to the particulars of the fuel itself
But yes, your point is absolutely valid. There's no reason at all why firearms would work, but internal combustion engines would not. The only thing that could knock out technology, but not people and guns would be some form of EMP. And that would only affect newer cars (and you can remove/replace the affected components).
A more reasonable model would be that whatever knocked everything out did so effectively enough that they couldn't get things started again. So much of our industry is automated and controlled by computers, that if you can destroy them, we'd have a hard time rebuilding. But it wouldn't be "nothing works". There would be very few things that would, and it wouldn't be enough to maintain the volume of industry required for our modern world to operate. If the argument about cars wasn't a failure of the engines, but a lack of ability to refine fuel, it would make a tiny bit more sense.
We'll see if they better explain the problem in the series, and why engines can't work yet firearms can. But as of now it seems like a poorly thought out plot point to force people to run around riding horses in the not so distant future.
Which is probably exactly what happened. Unfortunately, I've seen a trend for TV/film writers to write stuff that makes absolutely no sense (or is straight out impossible) just because it makes for a good story or twist. They go for the "this would be really cool" approach, but then can't seem to noodle out how to make said cool thing happen in a logical and consistent manner, so they just kinda throw up their hands and do it anyway.