It could be due to 2 reasons .
1. If your decay was deep then the composite restoration could be producing pressure on your tooth nerve as it is close to it . You can identify it by the type of pain you are having . If it is severe pain and increases then it could be one of the reasons . Take Tablet Ketorol DT - 2 tablets mixed in half glass of water and get in touch with your dentist. If needed again this tablet can be taken again - 1 tablet mixed in water in an interval of 8 hours you can take , maximum for 3 days and 3 times a day .
2.Secondly it could be due to improper contouring of the filling . A bite correction will need to be done and that will fix the issue .
Assuming you got the filling done 4 days back as stated by you , you should go back to your dentist and get it corrected or if it the first case then get an x ray done and if deep you will need a root canal treatment for that tooth .
Next Steps
Contact your dentist schedule an appointment.
Health Tips
Always after restoration sit up and check the contacts of the new restoration . As while lying down in the dental chair the position is different and when we sit upright the occlusal contacts are different this leads to a discrepancy many a-times.