Bacteria can store extra resources for the lean times. It's a bit like keeping a piggy bank or carrying a backup battery pack. One important reserve is known as cyanophycin granules, which were first noticed by an Italian scientist about 150 years ago. He saw big, dark splotches in the cells of the blue-green algae (cyanobacteria) he was studying without understanding either what they were or their purpose. Since then, scientists have realized that cyanophycin was made of a natural green biopolymer, that bacteria use it as a store of nitrogen and energy, and that it could have many biotechnological applications. They have tried producing large amounts of cyanophycin by putting the enzyme that makes it (known as cyanophycin synthetase) in everything from E. coli to tobacco, but without being able to make enough of it to be very useful.
source https://phys.org/news/2021-10-bacteria-piggy-bank.html