it is your ignition switch.

If you can start it and it stops immediatedly then starter switch.

Bad contacts on the little white plastic thing behind the key switch. My rex did it. I could start it but it would immediately die. Or driving along and it would die.

There is a white ring with with contacts in it attached to your key switch. This is tied into your ignition harness.

They are about $40-60 from honda.