Getting your cavity filled should not be anything that worries you, as the entire process is done under a topical anesthetic. However, once you are done and go home, you should be focused on caring for your mouth for the first 24 hours.
The anesthetic is going to wear off and you may find that your tooth is slightly sore or sensitive. This is typically something your dentist will warn you of, but it can often be cared for with a simple dose of over the counter pain medication.
Following a Dental Filling, You Need to Eat and Drink Carefully
The most common issue people face immediately following a filling is their mouth being super sensitive to everything for a few hours to a few days. This can be hot, cold, eating, drinking, or even breathing. The best thing you can do is to eat and drink carefully with your mouth closed so as not to increase the potential of a sore reaction.
You should also make sure you chew and bite as lightly as you can, ideally on the side of your mouth that did not get a filling. If you can avoid your teeth making full contact, that should help the pain stay minimized.
You do not want to eat anything hard that would require a great amount of force to chew, and you want to avoid anything sweet and sticky until the sensitivity subsides. This will help keep your pain tolerable, and allow your filling to set up properly.
Being careful with your filling after you get it done will help your filling last as long as possible. The gentler you can be when you first get the filling put in, the longer your filling should last, and the less the entire process should hurt.