I look at four different battery-powered controllers in the video below that you can use to power your model trains. Three of the four also allow you to plug in an AC adapter for continuous power from a wall outlet, but then if you disconnect the adapter, you can run your trains for hours using battery power. These are great options for small portable layouts, especially N and Z scales. While you could use them to power some HO-scale locomotives that don’t draw too much power, your run time will be significantly less, given the higher power draw.
All of the controllers are available here: http://ztrackcenter.com/electronics/controllers
or from Amazon: https://amzn.to/3jH43Us
As an Amazon affiliate, I receive a commission on any products purchased through Amazon links.