In short, they did attempt to, but largely failed.
During the Napoleonic Wars, Denmark became economically weakened by the English seizure of the merchant fleet, by the (somewhat forced) participation in the Continental System and by the requirement to pay for the upkeep of the Spanish divisions for the planned invasion of Scania.
So during the wars, there wasn't the economic strength required for a full-scale rebuilding of a fleet of ships-of-the-line. Instead, after the loss of the fleet in 1807, a fleet of gunboats were built to support the single remaining ship-of-the-line "Prins Christian Frederik," and to capture British vessels. They were largely unsuccessful in this, being inferior to the British true warships. Many kaperer (privateers) were also licensed, to similarly disappointing results. The economy was so ravaged by the warfare that the Danish state went bankrupt in 1813. One year later, the Kiel Treaty was signed with Sweden, earning peace at the cost of Norway. The now reduced Denmark immediately started building a new fleet, but the continuing abysmal economic conditions set sharp limits to ambitions: 6 ships-of-the-line were built, 6 frigates, 14 lesser ships and 37 gunboats. There wasn't the financial capacity to simultaneously build and man these ships though, and most of the fleet was mothballed from the start.
Denmark was no longer a significant naval power, and no longer a significant economic power, two facts that reinforced each other.
It should be noted that the Danish navy later on was strong enough to blockade the German states in both 1848 and 1864, though perhaps more due to the almost non-existent fighting capability of those navies than due to Danish naval strength. The Scottish-built ironclad "Rolf Krake" was very modern in 1864 and feared by the Prussians and Austrians, so there's that.
As for later, the foreign policy of the even further reduced Danish state after 1864 was centered on neutrality and appeasement towards Prussia/Germany - participation in the naval arms race was impossible both diplomatically and economically.