Strange issue once in a while.

May not be the relay per se but probably in that circuit.

Learn some test points and then "try and catch it."

For one, get a 12V test lamp and multimeter and clip leads. Learn which wire (normally yellowish) at the starter relay is the "start wire."

I assume you have an automatic? The remaining "push on" terminal should lead down the firewall, over the top of the transmission, to the neutral safety switch

FIRST thing to try, is to hold the key to start with one hand, and work the shifter "wiggle" from park neutral, and back. See if it starts to crank or at least clicks.

Speaking of clicks to you hear any during the time it won't crank?

A "small click" indicates the starter relay is engaging. Still could be a bad relay, or starter solenoid, or the wire between the two