Because the Empire was rich, and as its successor, they inherited much if its wealth.
We learn in The Force Awakens that many of the Empire's resources ended up falling to the First Order, who pretty much control their own regions of space outside the Republic, and for the most part leave each other alone (until TFA). With much of the Empire's old funds combined with what they've been able to build up themselves in the intervening years, it's certainly not insignificant.
In The Last Jedi, we also learn that there are arms dealers developing new tech and working both sides. While the First Order likely develops at least some of their own tech as well, the fact that the dealers had blueprints for some of their major tools like Tie Fighters shows that their involvement is deeply entrenched.
Arms dealers profit best during war time. Given the technological advancements that came in the span in between Episodes 6 & 7, and combined with the resources the First Order had at its disposal (enough to turn a planet into essentially a super death star), a ship the size of Snoke's isn't really that significant.
Furthermore, it's not that the Empire couldn't afford a ship of that size. Like you pointed out, the Death Star is evidence that they could. Rather, they simply chose to invest in other things instead.