Dentistry has specialties just like medicine does.
You can chose to be a General Dentist and go straight to work right after dental school, or you can do a residency in Advanced General Dentistry (1-2 years) or General Practice Residency (hospital dentistry 1-2 years).
Other residencies include:
Pediatric Dentistry 2-3 years
Periodontics 3 years
Endodontics 2-3 years
Orthodontics 2-3 years
Public Health 2 years???
Prosthodontics 2-3 years.
Dental Anesthesiology 2-3 years
Oral and Maxillofacial Surgery 4-6 years
etc etc....
As a general dentist, you can practice to your level of training and comfort what amounts to probably 80-90% of what specialists do. That might not make sense, but as you learn more about dentistry you'll see for yourself. Some general dentists are great at doing root canals and do most or all of their own. Others are great at extractions, so they do most of their own.... Some love treating children and treat all of them except the worst brats. So there is a lot of flexibility with dentistry.