The function of the central dark florets of D. carota has been subject to debate since Charles Darwin speculated that they are a vestigial trait.[14] It has been suggested that they have the adaptive function of mimicking insects, thus either discouraging herbivory,[15] or attracting pollinators[16] by indicating the presence of food or opportunities for mating
Alright - so it's not only me who thinks that they look like spiky insects 😄
I don't have a positive ID for you but it appears to be in the Umbillifer family, some of which are edible in whole (carrots) and some of which are highly poisonous, even to the touch (hemlock). Be careful and don't eat or touch without a positive ID. Many from this family look similar. Wiki