How can I use Rosemary bulbs in cooking?
I don’t know what you dug up, but rosemary doesn’t have bulbs so do not eat this!

For plant id questions (which is outside the scope of this site), I recommend our sister site Gardening SE.