2014 GMC Terrain - Engine cut off

the engine cut off when I was driving home after work on the city street in heavy traffic

Well that’s not good. Have you had it towed to a god independent mechanic? What’s your question?

A faulty crankshaft position sensor can cause an engine to shut off and not restart.

https://www.rockauto.com/en/catalog/gmc,2014,terrain,3.6l+v6,3298522,ignition,crankshaft+position+sensor,7196

Tester

Fuel pump failures are not uncommon on GM trucks. But you need a diagnosis (no fuel? no spark? or what?), not just hunches. Good luck and please keep us informed.

Were any check engine lights on before it quit? If so, read the codes. A CPS should have had a code. Faulty fuel pumps or something associated may not unless there was a lean misfire or similar.

Not always true.

https://www.1aauto.com/content/articles/bad-crankshaft-position-sensor-symptoms

Tester

I have never seen one that caused a car to stop running not throw a code or throw the wrong code. Maybe this can be the case during early stages of failure.

Then that tells me you haven’t repaired enough vehicles that have had crank sensor failure.

Tester

Gotcha! The ones I had looked at definitely had a code but I think the people had run them with the problem for a while or until they simply quit. They had a code and no spark condition.

Certain things definitely do not always throw a code. O2 sensors have to be so far out before they throw a code. Grounding issues can cause all kinds of driveability issues but not trigger a code. The same goes for the fuel pump as mentioned.

There’s many things that can cause that symptom. Post the diagnostic codes you get from your shop’s diagnosis, folks will have more to go on. Assuming it still won’t start, the first step is to determine if the problem is spark or fuel. Try starting it with some starter spray into the air intake. If it starts and runs briefly, then stalls out, problem is probably with the fuel system. Otherwise with the spark system.