Yes sometimes cavity can lead to headache. Firstly visit a dentist around you ,don’t neglect it further .If the tooth can be saved ,try to save it . Everytooth has its own function which makes it very important .
And most importantly you are very young to lose two teeth .
Next Steps
Kindly visit a dentist and get a treatment plan
Health Tips
Maintain good oral hygiene . Brush ,floss and consume less sticky and sweet food