Can you please describe this type of headache more precisely (quality of headache, location, spreading, triggers, additional symptoms)?
The only type of headache with short duration of a second or few seconds as you mentioned in your case, are headcases known as Idiopathic stabbing headache.
They are defined as brief, sharp, severe jabbing pains about the head that occur either as single episodes or as brief repeated volleys.
The pain resembles a stab from an icepick, nail, or needle and typically lasts from a fraction of a second to 1 to 2 seconds (1 attack per year to 50 attacks per day, usually, affecting the same spot of the head).