I have 26.3/100 vitamin d, 6.97 tsh. I get frequent headaches almost everyday. What can be the problem?

Frequent headaches. Your 25(oh)d level is 26.3 and TSH 6.97 correct? They are both mildly low. The interesting thing is both low vitamin d and hypothyroidism (even when considered subclinical) are often associated with myopathy and other pain syndromes including frequent tension headaches and migraines. It would be a good idea for you to discuss with your doctor about treatment for these two conditions.
Hypothyroidism. Your TSH is high. That indicates hypothyroidism, and needs to be see seen and started on replacement therapy.
Dyslipidemia. Thyroid uses cholesterol to make hormones - if thyroid is low then body creates more temporary metabolities like lipoprotein a which is very painful since it causes damage to vessel wall with vascular inflammation - to relieve this use Niacin as neuro-htp available from biotics take 4 times a day for headache relief.