In absolute terms, no, not at all. It can’t ‘help’ the environment to start another motor to to use more man-made energy.
In relative terms, yes, it’s possible to do less harm (that is, to use less energy) by using mass transit.
That is, the instant that the bus, train, trolley, or whatever conveyance starts its motor, it’s using energy, and that energy usage causes some form of ‘pollution’ somewhere. That’s the absolute answer.
The relative answer, in general, is that public transportation, especially ‘mass transportation’ such as buses, trains, subways and trolleys, can carry far more people per vehicle-mile, and those vehicle-miles (though more than just a few cars) should be more than offset by the number of individual cars not placed in service. (That also includes, if carried to a logical conclusion, fewer resources used to produce the automobiles in the first place, if people can manage to avoid having a car altogether.) There’s another potential savings if enough cars are taken off the road at peak hours, in reduced congestion and waiting time for all vehicles on the road.
The cost, aside from the daily fares themselves, which is a direct cost (and which can be less than the direct cost of driving) is a certain route and timing inflexibility. To the extent that providers of mass transit attempt to make up for those shortcomings by offering more routes at more times to more places, then the energy savings are more and more eaten up.
But if you live on an existing mass transit route that serves your needs as to destination and time, then it makes perfect sense for you to use that.