Why go through the painstaking method of searching for merchant vessels and sinking them across a wide portion of the Atlantic Ocean, when they could have sabotaged and destroyed docks and shipyards which would have prevented merchant vessels from loading/unloading their cargo?
Why not pull a St. Nazaire-type raid across major docks in England?
The Saint-Nazaire Raid worked because it was targeting a single piece of vulnerable infrastructure, which could not easily be repaired or replaced. The Normandie Dock was the only drydock on the west coast of France large enough to take a modern battleship. A German battleship that was damaged in the Atlantic and which headed back to France would have to be repaired there. By destroying the caisson that sealed off the dock (as well as the associated pumping machinery), it could no longer be drained. This meant that any underwater damage to a ship could not be repaired, and complicated other repairs that needed to be made. Compared to the Normadie Dock, Britain's merchant ports were simpler, and had much greater redundancy; there were no single-point targets that would make them useless.
To unload a merchant ship in the 1940s needed, at its simplest, just a quay to which the ship could come alongside, and manpower to bring things out of the hold. Other infrastructure simply sped up the process. Cranes made it much quicker to take things out of the hold. Dockside railways and warehouses sped up the process of transshipment, getting the cargo to where it needed to go. Non-tidal docks let cargo be unloaded throughout the day, rather than just at high tide. Much of this infrastructure was beyond the capabilities of a small raid to destroy. Blowing the lock gates at the entry to the docks might make them tidal; yet there was no way to blow up the quays within the docks, meaning that they could still be used.
There was also considerable redundancy within the British port system. The Saint Nazaire raid destroyed a single lock gate, to a single dock. Liverpool, one of the main ports for cargoes coming across the Atlantic, had about 40 docks for loading and unloading merchant ships. These docks often had multiple entrances and exits, and were interlinked to each other: the Princes Dock, one of the largest, had three locks to enter it, as well as connections to docks to the north of it. Destroying one of the gates in one of these locks would still leave two locks for ships to enter, not counting the other locks in the other docks. There were also a lot of other ports that could be used if a single port was damaged. Looking at Liverpool again, there were docks in Wallasey and Birkenhead just across the Mersey. It was also linked to Manchester through the Manchester Ship Canal. Then there were more distant ports on the West Coast: Cardiff, Swansea, Bristol and Glasgow. East Coast ports could also be used, if necessary, despite the greater threat from German bombers.
Then we come to the fact that the Germans didn't have much to do a St Nazaire style raid with. The St Nazaire raid used 16 motor launches, a gunboat, a torpedo boat, and the Campbeltown. Of these, all but three of the motor launches were lost. The Germans did not have ships to throw away on raids like this. Their equivalent to the British motor launches, gunboats and torpedo boats were the S and R boats. These were comparatively rare. The British had built over 650 motor launches, not counting craft built in Canadian yards or the 500 smaller Harbour Defence Motor Launches, while the German R boats numbered only slightly more than half this. These German craft had to cover the long coastline of Occupied Europe against British raids and minelaying, as well as operating in the Baltic, Black and Mediterranean Seas. The S-boats also had to target British coastal convoys, running along the important East Coast and Channel routes - these convoys were vital for getting coal from the coalfields of the north of England to the urban and industrial centres of southern and central England. Losing craft for a minor effect would greatly compromise Germany's ability to carry out these tasks. The vast number of British coastal craft, including requisitioned vessels like yachts and trawlers, meant that a German raid was much less likely to pass unnoticed. This was especially true for raids on the main west coast ports. A raid trying to hit Liverpool or Glasgow would have to pass through the highly patrolled Irish Sea, while raids for Bristol or Cardiff would have to enter the Bristol Channel, similarly well patrolled. The Bay of Biscay, which the St Nazaire force had to pass through, was much more open, and much less heavily patrolled.
That said, the Germans did try to target British docks and ports, albeit in a less direct way. The Germans carried out a major minelaying campaign in 1939-40, using aircraft, small craft and submarines to lay minefields in the main entry routes to British ports. Using new magnetic mines, for which the British had no counter, these had a major effect, sinking about 200,000 tons of shipping in the first three months of the war, and damaging many more. The minefields nearly totally closed down the major port of London in November 1939, until British minesweepers slowly and agonisingly cleared it. Unfortunately for the Germans, carelessness with laying mines meant that the British were able to recover samples of the magnetic mines. Countermeasures were developed and deployed, greatly reducing the rate of sinkings. Following the Battle of Britain, a large part of the German bomber offensive targeted major port cities. London's Docklands were a major target for the Blitz, while the port cities of Liverpool, Plymouth, Glasgow and Cardiff were some of the most heavily bombed cities outside of London. These did heavy damage to the urban areas of these cities, but were rarely successful in doing serious damage to the port infrastructure; as noted above, this was highly resilient.