How does an ecosystem differ from the biosphere?
It's more specific.
The biosphere encapsulates the entire area of planet occupied by life forms. It lumps African savanna and the Amazon rainforest and the deep seafloor ecosystems and everything else all into one big Earth biosphere.
One step down from this is a biome, which basically includes all the ecosystems that line up with their living things and climate. All the tropical rainforests get grouped into one, all the deserts, etc.
An ecosystem is one step below this. It includes all the biotic and abiotic factors in one area. The Mojave desert would count as one ecosystem, distinct from other adjacent and non-adjacent ecosystems. Usually what splits these if they are adjacent is if there are geographical barriers like mountains or rivers, or the populations of species don't interact much between the two regions.
The few steps below this in order are: communities, which include only the biotic factors in an area (only the plants, animals, insects, etc. in the Mojave desert ecosystem, but not the wind and rocks and sand); populations, which include only members of one species (e.g. all the coyotes in the Mojave ecosystem); finally, individuals (one coyote).
So, ecosystems include all of the last paragraph plus all the non-living factors in an area like the sun, sand, rocks, air, etc.