Has anyone ever had their 3 year old have a cavity before?

If so what was the process like? Is it dangerous to put a 3 year old in general anesthesia? If the dentist says it’s best to do it that way instead of local. I’am so nervous. I feel guilty. Not until my toddler turned 3 I started giving more sweets. Every day he’ll have 1 popsicle sometimes a little more sweet. He doesn’t drink juices at all. I noticed when brushing one tooth in the front had yellow specs. I thought maybe I didn’t brush that good but it wouldn’t coke out. I think he might have a cavity and he’ll be seen by a dentist soon. But I feel like such a bad mom. Has anyone gone through this with their child?