This can be done in story or career mode. In career mode, you start with enough money to buy an e-bus, and the buses are unlocked, so it's faster to do it that way. However, you'll have more than enough money by the end of the story mode to do this naturally.
Once you buy an e-bus, drive it or fast travel it to the depot and park it under the charging station, which looks like this: