Teeth can become sensitive after fillings are done for a variety of reasons:

Sometimes the filling may be slightly too high which can cause sensitivity because you are biting harder than normal on it. Call your dentist and they should easily be able to take care of this for you

Deep cavities that are close to the nerve may become sensitive after a filling is placed. If your bite feels fine and everything else feels ok, then the tooth may just need some time to heal.  It is always a good sign if the sensitivity begins to decrease after the first several days. If your sensitivity has not gotten better after 2 weeks, then you should call your dentist to have them take a look at it for you.

Sometimes, the nerve of a tooth can react negatively to a cavity that reaches close to it. Teeth where the sensitivity does not decrease after several weeks may require additional treatment to help relieve the symptoms