It is safe to consume onion, ginger and garlic after sprouting, and it does not produce toxins that are detrimental to one's health. It is completely safe to eat. It's just that the taste is a little worse.
If the garlic buds, you should eat as soon as possible, if you eat late, the buds grow long, you can only eat garlic seedlings.
Ginger is best stored in the sun, so it is not easy to sprout.