Basics need to be checked/confirmed first as others have said;
Check all earths and all connections on the relevant circuits for being clean/secure and for continuity.
If they're ok the likely causes are then ignition switch, main fuel pump relay or the ECU failing to recognise that the engine has started.
This is based on the basic principle/sequence of a fuel injection system being;
Ignition on - fuel pump is energised for a brief moment, to build up pressure in the rail
Key switch to start - fuel pump relay is fed directly from the ignition switch, in order to energise the fuel pump while cranking
Key switch back to ignition - fuel pump relay is fed/maintained by a signal from the ECU so long as the engine is running
Key to 'off' - ignition feed to the main ECU is removed so the fuel pump relay drops out, causing fuel pressure to be lost (may also remove feed to the +ve contact side of the fuel pump relay depending on the circuit design on the car)
Does this tend to happen after the car has been used and then parked up for a short while? If so, that to me would suggest the main fuel pump relay - (the coil or contacts go open circuit as they warm up although tend not to drop out during use, but do then fail to work on 'restart')
If it's also (or only) on a proper 'cold' start, then that would suggest to me that the ECU is not recognising that the engine is running, so it doesn't take over supplying a feed to the fuel pump relay.
Not sure what the C5 uses to determine engine running. Some cars use oil pressure, some use alternator charging, or more modern cars may use who knows what (I dunno, I'm used to working on stuff from the 90's
The ignition switch could sit in either category, but if that's faulty you would normally/may notice the instrument panels go out at the same time.





