So there are autotrophic cyanobacteria and heterotrophic Escherichia coli in prokaryotes. Eukaryotes include autotrophic green plants and various heterotrophic animals.
Cell metabolism is just a chemical reaction. What do you think the chemical reaction is related to? Reactants and reaction conditions, of course! Without reactants in the battery, the reaction can't proceed. The reaction conditions are mainly related to enzymes. So anything that affects the activity of the enzyme will affect the smooth progress of the reaction. The enzyme is mainly protein, and the synthesis of protein is controlled by DNA, so DNA can control metabolism by controlling the synthesis of enzyme.
A large part of the metabolic activities of cells are carried out in the cell matrix, and of course some metabolic activities are carried out in various organelles, such as the main process of aerobic respiration, such as photosynthesis.
So we say that DNA is the control center of cell metabolism, and protein is the substance that regulates metabolism.