Ecology is the study of how organisms interact with each other add their surroundings.
Whereas, environmental science is the study of the elements of earth and life sciences.
Ecologists typically work within the field of environmental science, and focus on the interactions between different organisms within an ecosystem.
This means, that there is a part of Environmental Science that is not ecology- for example the study of ocean currents.
And on the other hand, ecology typically involves the environment, so it can be understood as its sub-field