Thanks for all the additional information. Coming to the discussion;
There are few different conditions as mentioned below that can present with the electrical shock like feeling in the head;
Certain structural abnormalities in the brain
Underlying medical conditions like thyroid diseases, vitamin deficiencies etc
Inner ear disorders
Idiopathic (cause is not found) etc
Considering that this symptom hasn't been yet properly evaluated I advise you to undergo a thorough clinical evaluation followed by certain investigations including a CT or MRI of the brain. This will help in ruling out any structural abnormalities in the brain that can produce similar symptoms. But most often CT or MRI comes normal so there may not be anything serious to explain these symptoms.
You also require an EEG to look for any seizure activities.
Rarely people may experience these symptoms if they have underlying medical conditions like thyroid diseases, vitamin deficiencies etc so you may undergo certain blood investigations too to look for these possibilities.
Because you experience some tinnitus like feeling an inner ear disease is a possibility too, and the CT or MRI mentioned above generally helps in looking for ear conditions too. Later you may need a separate ENT Dr evaluation too.
If any of these above investigations/evaluations reveal any abnormalities, then it will be treated appropriately.
Even stress could produce these kinds of symptoms (if you have any stress, but not otherwise).
Many times even after extensive evaluation & investigations cause for these kinds of symptoms may not be found, then these are called as idiopathic in nature.
Regarding your other symptoms like feeling less clarity of thinking, and feeling not sharp as before - the above mentioned investigations like CT or MRI of the brain & the blood tests will help to explore what may be causing these symptoms too. If any such causes are identified with these investigations, then they will be treated appropriately. If all these above investigations come normal, then these symptoms could be just secondary to part of the aging process itself rather than anything else.
I recommend you to see your clinic Dr. for the further needful that will include a thorough clinical evaluation/examination & investigations (CT or MRI, EEG, blood tests etc.) as discussed above, and if any of these tests reveal any abnormality they will be treated appropriately. But I am reassuring you that these symptoms most likely are not due to any serious underlying conditions. And also the electrical shock like feelings are not mini strokes (TIAs) based on the details provided by you. Continue with your healthy life style as before, you will do fine, all the best!
The above are my opinions & recommendations regarding the diagnosis and management of your electrical shock like feeling in the head as well the cognitive symptoms you mentioned, and please ask me if there are any further questions.