The theory was that the planet killing Doomsday Machine was built by a long-gone civilization from another galaxy for use during an unknown war. It was on on course to the heart of our galaxy when the Enterprise encountered it and the battle damaged USS Constellation after following it's wake of destruction through two star systems. Where in the Star Trek galaxy did the encounter with the Doomsday Machine take place?
The Constellation was destroyed in the Rigel system, Kandari sector, Alpha Quadrant. Specifically in a nearby star system called L-374. So depending on the vector (and assuming the weapon was coming from the edge of the galaxy closest to us) it would not have traveled a great distance into our galaxy. Or perhaps it only destroyed things directly in its path. I can see a lot of stars from the edge of the galaxy before it reached Sol...
The Rigel system was an inhabited planetary system consisting of at least twelve planets around its primary Rigel. An asteroid field was located 2 days away at impulse speed from Rigel XII. (TOS: "Mudd's Women", "The Doomsday Machine"; ENT: "Broken Bow")
The Rigel system was the first star system visited by the Enterprise NX-01, the first Earth starship with the warp 5 engine, after it departed from the Sol system. The Rigel colony on Rigel X was a popular trade complex at the time, visited by numerous species. (ENT: "Broken Bow")
In the mid-23rd century, the Rigel system was part of the most densely populated section of the Milky Way Galaxy. (TOS: "The Doomsday Machine")