I think your restoration having marginal leakage ,Marginal leakage is the penetration of fluids, bacteria into the space existing between all restorative materials and cavity walls. It can cause pulp irritation, pain , it can develop peri apical or periodontal infection.
Next Steps
Visit nearest your dentist for IOPA and clinical examination of tooth (for RCT or other treatment options)