Q: Why does the car (randomly) crank but not start? on 2000 Mazda Protege

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
I can drive the car 2 hours with multiple shut offs or 5 minutes with shutting it off only once and the car will crank and crank but will not start immediately . 5-10 minutes later it will start...sounding drained, but will run smoothly. The only consistent start is the first start in the morning with no issues. The rest of the day is sporadic.
(1) Answer
(2) Comments
Check engine light had come on and it was scanned and the codes were for the cat and egr valve.
Well if the cat is bad the car will not run propperly, because it can't breath and if the EGR is stuck you will have a hard starting condition, start with the EGR valve first..