Hello. Based on the symptoms you described, getting the filling was not a wrong decision. In fact, your dentist appears to have taken a conservative approach to assess whether the tooth could be saved without a root canal.
The history of spontaneous pain, especially pain at night that subsided on its own, suggests that the nerve inside the tooth was already severely inflamed (irreversible pulpitis). Sometimes, after removing deep decay and placing a filling, the inflamed pulp reacts more intensely, resulting in severe pain. This does not mean the filling caused the problem; rather, it indicates that the tooth may no longer be able to recover on its own.
Next Steps
Since the pain has become much more severe after the filling, I would advise proceeding with the root canal treatment (RCT) as recommended by your dentist. Continue taking the prescribed medications and avoid chewing on that side. If you develop swelling, fever, or difficulty opening your mouth, please seek immediate dental care.
Health Tips
Wishing you a speedy recovery.