I have sharp stabbing pains after eating bread and yogurt. What could it be?

Cavity or cracked. Tooth. Neither can be good. It sounds like, regardless of cavity or cracked tooth, it's causing pain, which means dental nerve inside tooth is affected. This can lead to nerve death. Please seek dental care.