How did prokaryotes early in Earth’s history alter the environments on Earth?
They discovered the trick of photosynthesis and thereby changed the atmospheric composition and changed the course of biological evolution.
Simple prokaryotic bacteria were probably the first life form on Earth. Some called cyanobacteria discovered how to extract energy from the sun by photosynthesis. As a result, oxygen started to accumulate in the oceans and was subsequently used to oxidize iron in the ocean to form iron oxide deposits. Once all of the iron in the oceans was oxidized, free oxygen started to accumulate in the atmosphere, changing the composition from the previous anoxic atmosphere.
An oxygen atmosphere changed the course of biological evolution in favour of organisms who could use oxygen for metabolism (like us humans and most organisms on the planet today!).
Prokaryotes were likely the ancestors of more complex eukaryotic cells, which eventually evolved into multicellular organisms, like us again!
So, in a real sense, prokaryotes are you great, great, great, like a gazillion more greats .... grandmother/grandfathers!