Sometimes when you turn the key-to crank it starts clicking and won’t crank. All the lights start going off and on. Had the battery and alternator tested both good. It’s not a dead battery click it acts like a relay cycling off and on. Any
Starting relay or possible bad ignition switch. Could also be loose battery cable
Test for loose battery cables first. If that doesn’t fix it, find the starting relay, likely in the under hood fuse box, and replace it or swap it with an identical relay in the box. Drive on, see if that fixes it.