I am on a keto diet
I am familiar with that diet.  It is used primarily to treat children with epilepsy.  Did you have epilepsy as a child?
No I do not. But it was recommended by the doctor
It is a high fat, low carb diet.  the fat is broken down in the liver into Ketone, which replaces the glucose in the blood stream, improving brain function.
How does Ketone improve the brain function
. The ketone bodies pass into the brain and replace glucose as an energy source. An elevated level of ketone bodies in the blood, a state known as ketosis, leads to a reduction in the frequency of epileptic seizures. Around half of children and young people with epilepsy who have tried some form of this diet saw the number of seizures drop by at least half, and the effect persists even after discontinuing the diet. Some evidence indicates that adults with epilepsy may benefit from the diet, and that a less strict regimen
Ketogenic diet
The ketogenic diet is a high-fat, adequate-protein, low-carbohydrate diet that in medicine is used primarily to treat difficult-to-control (refractory) epilepsy in children. The diet forces the body to burn fats rather than carbohydrates. Normally, the carbohydrates contained in food are converted into glucose, which is then transported around the body and is particularly important in fueling brain function. However, if little carbohydrate remains in the diet, the liver converts fat into fatty acids and ketone bodies