Hi. Pain after a filling usually happens when the cavity was deep enough to infect the nerve of the tooth.
Once the nerve is infected, a simple filling will not work because a filling will not be able to remove the infection in the nerve.
In such cases, an x-ray is done to confirm the problem and a root canal followed by a crown is the treatment of choice.
Next Steps
Visit a clinic and get an x-ray to confirm the problem