Onions are small annual herbaceous plants, of which we eat the fleshy leaves, which towards the base of the plant tend to swell, forming bulbs of various sizes. They are grown in the garden, and growing in pots is not recommended, since they require a good amount of space.
The soil should be rich and worked thoroughly. You can plant out small sprouted seeds, which have already produced a few long leaves, or directly plant seeds, or you can use the bulbs from the last year. In any case, remember that it is good to keep a good distance between the future onion plants: something which also depends on how you are going to use them. For small spring onions to be collected fresh, it is best to leave at least 7-8 cm between the plants; while for large onions to be kept through the winter, it is good to cultivate them with at least 15-20 cm between them, to be able to act over time to eliminate any weeds, and also to cover the bulbs over with earth, to keep them in the dark.