Bananas change from yellow to brown quickly mainly because of ethylene gas, which speeds up ripening. When bananas are stored with other fruits like apples or avocados, they ripen even faster because those fruits also release ethylene.
As bananas ripen, starch turns into sugar and the fruit softens. At the same time, natural enzymes react with oxygen, causing brown spots and darkening. Warm temperatures, bruising, or storing them in enclosed spaces can make this happen even faster.
To slow it down, keep bananas separate from other fruit, store them in a cool, open place with good airflow, and avoid sealing them in bags.