Yes, an onion is a bulb.
The onion ( Allium cepa L.) is widely recognized and cultivated as a vegetable crop globally. The onion bulb itself, known for its distinctive flavor, is a commercially valuable horticultural spice. Therefore, botanically speaking, the part of the onion we eat is indeed a bulb.