A symptom of pain is indicative of a deeper cavity which is either close to the nerve or already in contact with the nerve. An X-ray is helpful to diagnose that.
The treatment required would be a deeper Filling or a root canal procedure . The cost of the filling is lesser than a root canal procedure.
Next Steps
Visit the local dentist to get an xray done
Health Tips
Can continue with over the counter pain killers in the meantime, to avoid extreme temperature food / liquids and keep the area clean.