It’s just a baby tooth with a cavity, so the dentist removed it. Unfortunately, that’s not the end of this story.
If the removed baby tooth was a back tooth, it can allow the adult teeth behind it to tip forward and block (impact) the tooth under the removed baby tooth. This can lead to an expensive braces treatment to correct the problem.
If the removed tooth is a corner tooth (cuspid) it will cause the front adult teeth to lean to that side making the center of the teeth not match the center of the face.
When a baby tooth is removed by the dentist after age 5 that is the time for an evaluation by the orthodontist. Often the front teeth can be centered by removing the baby tooth cuspid on the opposite side, then there is equal space on both sides and the front teeth upright all by themselves.
At the time the back baby tooth if removed, a spacer (space maintainer) can be placed to hold the place for the adult tooth until it comes to the surface. Once the spacer is placed, it needs to be checked at regular intervals so it can be removed at the proper time. If left in place too long, it can interfere with the adult tooth growing.