Car turns over but won't start

I turn the key it turns over but won’t start. I can hear the fuel pump. I tried the sparkplug thing and that worked. Can you give me any ideas

Spray a little starting fluid in the air intake while turning the engine over. If it fires then dies you’ll know you have a fuel supply fault, perhaps a plugged fuel filter or maybe lost fuel pressure.