What was the cause?
How long ago was the filling placed? Did your dentist advise you of some precautions to follow that you did not heed? Did your dentist suggest a guarded prognosis for the durability or life of the filling.
You need to discuss this issue with your dentist. The breaking of the filling might not have been preventable. Sometimes a dentist will replace a recent filling at a reduced fee or for free.