Although the surface is largely barren and lifeless, the world of Exegol has large underground populations of Sith loyalists, droids and slave labour, captured from worlds inside the Unknown Regions.
Secreted in underground launch bays beneath the surface of Exegol is
the final stage of the First Order's long-gestating plan of conquest.
The loyalists who have been toiling in secret to bring the return of
their glorious Empire and to resurrect the Sith Order include
engineers, shipwrights, and enslaved labor. Their efforts have created
hundreds of warships and thousands of starfighters ready to launch.
While the Sith monolith is the site of macabre rituals that plumb the
secrets of the Force, the neighboring staging grounds represent pure
military might, grounded in the Imperial legacy of rule through
technological supremacy.
Rise of Skywalker: Visual Dictionary
Additionally, specialist parts and plans were stolen out from under the nose of the New Republic. It seems that both the Kuat Shipyards and Sienar Fleet Systems were covertly passing 'supplies and designs' to the Sith.
The presence of Sith loyalists within the executive boards of Sienar-Jaemus and Kuat-Entralla allowed the clandestine tunneling of supplies and designs to Exegol through various intermediaries.
The First Order dreadnought was a test project that informed the Xyston-Class Star Destroyer design.
Rise of Skywalker: Visual Dictionary
With an essentially unlimited population of free labour culled from thousands of worlds, vast quantities of stolen parts and noting that Palpatine hid vast manufacturing capacity inside the Unknown Regions (some of which was put to work building the First Order fleet) building a large fleet of ships shouldn't be too hard if you're happy to work your slaves to death.
As to why we can't see any building works on the surface, much like the droid factories of Geonosis, with automation and the willingness to strip a planet of all of its usable ore, it's possible to build a gigantic fleet without much surface detail.