Yes. Removing even a small amount of decay and replacing it with a filling is the best way to prevent the cavity from traveling deeper into the tooth where it will likely become painful and require a crown or a root canal to fix.