Your dental pain may result from occlusal interference of temporary restoration or pulp infection. Going back to your dentist to have further occlusal adjustment is advised.
One cannot answer your question without seeing and analyzing the exact situation. It would be better that you immediately see a doc.