It’s never said or shown that they didn’t. Considering that the Resistance are hiding out in the wilderness on a jungle planet in TRoS, that leads me to believe that the First Order did essentially succeed in taking the Galaxy, and that there are just a few planets (not major systems) that are still holding out.
But again, the real problem is that this is all so vaguely relayed to the audience that it doesn’t really matter. I doubt that JJ Abrams thought very deeply about the state of the Galaxy during TRoS, so I don’t see much point in trying to make sense of something that didn’t matter to him.