Storing and preserving food should be one of the easier tasks for merfolk.
There are some places undersea that are excellent environments for preserving organic matter. For example, cold, low oxygen parts of the bottom of the Black Sea, Per National Geographic:
In most seawater, wood and rope are among the first things to decay.
But the unusual water chemistry of the Black Sea dramatically slows
rates of disintegration. Many of the shipwrecks that Adams and his
team found were in depths below 150 meters, and some lay as deep as
2,200 meters below the surface.
The wood of some ships was so well-preserved that chisel and tool
marks were still visible on individual planks. Rigging materials,
coils of rope, tills, rudders, and even carved wooden decorative
elements have survived the centuries largely intact.
“Nobody has seen anything quite like this before,” Adams says. While
historical texts and illustrations give some information about the
appearance and construction methods of merchant ships in different
periods, Adams hopes the extraordinary preservation of these wrecks
will allow archaeologists to independently verify those historical
British and Irish bogs and similar, muddy, shallow water, low oxygen environments are also good place for preservation of food. Researches have recently recovered 3000 year old butter stashes in these bogs. At that point it isn't yummy, but it is still edible. There is a picture of it below:
Honey can also make an excellent long term preservative (also thousands of years) and being underwater where it is cool, protected from light and is protected from bears and insects and people who like to raid and eat it (sea animals don't seem to have as much of a sweet tooth as land animals do), are all a good fit. Obviously, the merfolk couldn't make honey themselves underwater, but this could be something that the desire as a trade good in exchange for something else.
And, of course, don't forget one of the most common premodern preservatives, which is salt: salt meat including beef and fish are some of the oldest foods with long shelf lives and the oceans have an abundance of salt.
Salting, either with dry salt or brine, was a common method of
preserving meat until the 19th century. It was frequently called
"junk" or "salt horse".
Salt inhibits the growth of microorganisms by drawing water out of
microbial cells through osmosis. Concentrations of salt up to 20% are
required to kill most species of unwanted bacteria. Smoking, often
used in the process of curing meat, adds chemicals to the surface of
meat that reduce the concentration of salt required.
Salted meat and fish are a staple of the diet in North Africa,
Southern China, Scandinavia, coastal Russia, and in the Arctic. Salted
meat was a staple of the mariner's diet in the Age of Sail. It was
stored in barrels, and often had to last for months spent out of sight
of land. The basic Royal Navy diet consisted of salted beef, salted
pork, ship's biscuit, and oatmeal, supplemented with smaller
quantities of peas, cheese and butter. Even in 1938, Eric Newby found
the diet on the tall ship Moshulu to consist almost entirely of salted
meat. Moshulu's lack of refrigeration left little choice as the ship
made voyages which could exceed 100 days passage between ports.
Salt Fish hanging in a Hong Kong market in 2011 via Wikipedia
@John also has a good point about live storage. Most Asian grocery stores in the U.S. sell very fresh fish and seafood by having at least some varieties live in tanks in their stores until it is purchased, and this would be a natural approach for merfolk.
Live lobster storage as a grocery store via Wikipedia