Herbaceous and woody plants are the fundamental producers in terrestrial ecosystems because they photosynthesize, creating organic matter.