starters can be temperamental also, they can get a flat spot inside and sometimes work and sometimes not, fought this issue on my 03 Silverado, replaced a bunch of stuff and then come to find out it was the dang starter the whole time
. Hence why I said smack it with a hammer, if it works each time you do that then there's your sign.
the starter cable can go bad also so test voltage from the battery to the starter while the key is in the start position should be 10.5 volts or more
and while you are at it test the battery they can go bad as well might show 12v but has no amp's (cca) had a 6 month old battery just go bad within minutes.
just easy things to eliminate before chasing down the ignition portion.