The chemical reactions and pathways resulting in the formation of substances, carried out by individual cells.