Autotrophy (plus more!):
An autotroph or primary producer, is an organism that produces complex organic compounds(such as carbohydrates, fats, and proteins) from simple substances present in its surroundings, generally using energy from light (photosynthesis) or inorganic chemical reactions (chemosynthesis).[1] They are the producers in a food chain, such as plants on land or algae in water (in contrast to heterotrophs as consumers of autotrophs). [Wikipedia]
Noted in “Zombieland: The vast world of hidden microbes miles beneath your feet,” Graham Lawton, NewScientist (11 May 2019, paywall):
But by far the most common deep lifestyle is autotrophy, which means making your own food. Under the earth, microbes use the rock itself as a source of energy. Under intense heat and pressure, chemical processes generate energy-rich inorganic molecules that microbes can break down to produce energy. Collectively, these organisms are known as chemolithotrophs, which literally means “chemical rock eaters”.