If the Doomsday Machine came from the Andromeda galaxy then it would have been mighty hungry by the time it reached here!!! Even with the Kelvan adaptation of the Enterprise's engines that reduced the travel between galaxies to three hundred years, that is still a heck of a long time! Plus it seemed to be homing in on other planetary systems during the episode so it must have been able to conserve it's energy derived from eating the matter of the crushed planets!

JB
Maybe the DDM can suck up thin, interstellar dust like an enormous bussard collector to fuel itself between galaxies plus travel in low energy mode.
Or then it doesn't really get any sort of nourishment out of the stuff it "eats", that is, chews. ....What may have justified Spock's speculation is an unseen analysis of the star systems the heroes traveled through in their search for the culprit, though. Perhaps missing radioactives are Spock's cue there? OTOH, if the beast truly has a total conversion drive, fissionables don't convince me as a potential fuel...
Timo Saloniemi
AFAIK, stellar streams orbit their galaxy, consequently they are confined to the immediate galactic neighborhood of their galaxy, and there is no known stellar stream connecting two galaxies.
From the supplied link (emphasis added):
"A
stellar stream is an association of
stars orbiting a
galaxy that was on[Qce a
globular cluster or
dwarf galaxy that has now been torn apart and stretched out along its orbit by tidal forces." The Sagittarius Dwarf Spheroidal Galaxy is still undergoing this process so dwarf galaxy to MW...
Spock didn't say it come from one of the Milky Way's satellites, he said it came from another unqualified (i.e. non-dwarf) galaxy.
SPOCK: Unknown, Captain. However, Mister Sulu has computed the path of the machine, using the destroyed solar systems as a base course. Projecting back on our star charts, we find that it came from outside, from another galaxy.
Why would Spock have to say "dwarf galaxy" instead of "glaxy" if the track of destruction came from a dwarf galaxy?
In 2006 the International Astronomical Union created official definitions which make "planets" and "dwarf planets" too different and totally separate categories of astronomical objects. So long as those definitions remain in force, it would be scientifically incorrect to call a dwarf planet a "planet". Is that the case with dwarf galaxies and galaxies?
Dwarf galaxies are the most abundant type of galaxy in the
universe but are difficult to detect due to their low
luminosity, low
mass and small size. They are most commonly found in
galaxy clusters, often as companions to larger galaxies, and are classified into three main types:
https://astronomy.swin.edu.au/cosmos/D/dwarf+galaxy
A
dwarf galaxy is a small
galaxy composed of about 1000 up to several billion
stars, as compared to the
Milky Way's 200–400 billion stars.
https://en.wikipedia.org/wiki/Dwarf_galaxy
Miniature galaxies, called dwarfs, have even higher proportions of dark matter than larger galaxies because the motions of their stars cannot be fully explained by the sum of their stellar mass alone. Dwarf galaxies are also the most common type of galaxy throughout the Cosmos. They contribute significantly to the mass of the Universe, but very little is known about them partially because they are small and dimly lit.
https://www.cosmotography.com/images/dwarf_galaxy_dark_matter.html
These statements state that dwarf galaxies are a subcategory of galaxies in general; in fact the most numerous subcategory of galaxies. A typical, average galaxy is a dwarf galaxy, just as a typical, average star is called a dwarf star.
Therefore, it is perfectly correct to call a dwarf galaxy a plain "galaxy".
The Doomsday machine may not need a lot of fuel to travel through intergalactic space. In "By Any Other Name", the Kelvins modified the Enteprise to make a voyage of about 2,500,000 light years, and taking almost 300 years, to the Andromeda Galaxy.
The Kelvin modifications included greatly increasing the speed of the Enterprise, and might have might have included making the Enterprise's engines more fuel efficient and/or adding more fuel storage capacity.
But it is certainly possible that the Enterprise normally carries enough matter and antimatter fuel to take an almost 300 years long journey to the Andromeda Galaxy about 2,500,000 light years away.
Or maybe the Enterprise has the ability to gather interstellar hydrogen with a Bussard collector and convert half of that hydrogen to antimatter for the matter/antimatter reactions. Today it takes millions of times as much energy to produce an antiparticle as is produced by annihilating that particle, but possibly the Enterprise has an almost totally efficient process that produces antimatter with no greater energy requireements than the energy the fusion reactors can produce by fusing some of the hydrogen collected in interstellar space.
In that case the Enterprise could travel in interstellar space until the warp engines wore out. And even though hydrogen gas is much thinner in intergalactic space, it might still be possible to fuel a starship or a Doomsday Machine with the thin hydrogen gas in intergalactic space.
In either case, apparently the fuel requirements for an intergalactic voyage of millions of light years lasting for centuries would not be great enough that huge external fuel tanks - making it look like a multi stage rocket - would have to be added to the Enterprise or to the Doomsday Machine for such a voyage.
So the only reason why the Doomsday Machine would have to "eat" some of the rubble of hte planets it destroys would be to fuel its planet destroying weapon. i
The rubble of any astronomical body large enough to be called a planet would be incredably vast compared to the size of the Doomsday Machine. Even if the Doomsday Machine needed only one millionth of the mass of the first planet it destroyed to fuel the explosion of the next planet to be destroyed, that one millionth of a plaent's mass would probably be countless thousands of times as large as the doomsday Machine.
But the Doomsday Machine is not shown using vast external fuel tanks many times its own size. Presumably it has a way to convert almost all the planetary mass that it "eats" into energy which is stored inside it with extreme energy density.
Or maybe the Doomsday Machine travels to a planet, slices off a tiny piece of it, converts that tiny peice into energy for the weapon, an d slices off a ten times larger pice, convents that to ten times as much energy, uses that energy to slice off a piece a hundred times as large, converts that piece into a hudnred times as much energy, and so on and so on until it has enough energy to slice the planet up into pieces.
In any case the energy requirements to convert a planet into rubble are immense, while the energy requirements necessary for interstellar travel are apparently much less in
Star Trek. There is absolutely no statement in
Star Trek that the Federation or any other power destroys entire stars, or entire planets, or even entire asteroids, for fuel for warp drive use.
In my opinion, the doomsday Machne would not be "hungry" for fuel tor its faster than light drive after arriving from a voyage from another galaxy, no matter how many decades, centuries, or millennia such a voyage took. Instead it would be "hungry" for fuel to power its planet destrying weapon. which it hadn't used during the intergalactic voyage.
And apparently the Doomsday Maachine can get the fuel it needs for its planet blasting weapon from the planets it destroys.