A Sometimer Machine

Its an 08 Sportsman 500 HO that ‘sometimes’ cranks a while before it fires up. Then ‘sometimes’ it will shut off when you drive off. But will restart and may do it again. But most always runs good. Then the thing it also ‘sometimes’ does is after you ride it and immediately want to restart it, it will not crank over till you shut the key off and wait about 2 minutes. And also ‘sometimes’ when you crank it over and it don’t start but you keep on cranking, it will quit cranking. If you leave the key on it will never crank again, but if you turn the key off and wait a short while, you can hear a click like a circuit breaker resetting in the front. Then it will crank over again. When it don’t crank or start the dash lights come on like normal. No codes set. Is there a circuit breaker in there somewhere? I know it’s some kind of electrical issue, so wondered if anyone has any direction to head me in? Thanks for your help in advance!