The Kriegsmarine had no direct effect on the invasion, but did have an indirect one: they laid a lot of mines.
The coastline was protected by large numbers of naval mines, and more would be laid by U-Boats and E-Boats. In addition to dozens of landing and patrol craft, mines took the largest toll on major naval assets. The cruiser HMS Scylla and destroyers USS Fury, USS Glennon, USS Rich, HMS Wrestler, USS Meredith and USS Osprey were all sunk by mines, or damaged so badly they were written off. In addition, the battleship HMS Nelson was damaged by mines.
The Allied loses were very light, considering they had almost 7000 vessels making a frontal assault on a fortified coastline. And it was peanuts compared to the losses in the Pacific where a single battle might see the loss of three heavy cruisers.
The invasion fleet was drawn from eight different navies, comprising 6,939 vessels: 1,213 warships, 4,126 landing craft of various types, 736 ancillary craft, and 864 merchant vessels
24 warships might sound like a lot, but keep in mind many of those warships were small vessels and landing craft. To get an idea of the make up of the naval force, here are the ships which supported the landing at Omaha.
To lift and land this initial assault force of 34,000 men and 3,300 vehicles required 7 transports, 8 LSI's, 24 LST's, 33 LCI (L)'s, 36 LCM (3)'s, 147 LCT's, and 33 other craft, while the escort, gunfire support, and bombardment missions employed 2 battleships, 3 cruisers, 12 destroyers, and 105 other ships. Force "O" also included 33 mine-sweepers and 585 vessels used in service work.
Further information comes from searching the list of US Navy losses and British loses for June 1944 which reveals mostly landing craft.
By this point in the war, the surface Kreigsmarine was largely ineffectual. The handful of cruisers remaining were no match for the Allied fleet and air supremacy, and would likely have been destroyed by air strikes long before reaching the invasion beaches. They were employed with shore bombardment and rescue operations on the rapidly crumbling Eastern Front. The battleship Tirpitz was bottled up in Norway. Torpedo boats proved troublesome, but largely ineffectual. They sunk one destroyer on D-Day.
U-Boats were nowhere to be seen, the Battle Of The Atlantic had been lost the previous year and the U-Boats withdrawn from the Atlantic. U-Boats were no threat in the heavily constricted and patrolled waters off the invasion beaches.
The Germans conceived of several designs of midget submarines to attack Allied shipping, but they were not ready in time for D-Day. Rushed designs, hastily trained crews, and the flawed idea of midget submarines in general doomed the programs, they were all total failures. The closest to practical was the Biber with 324 built, but it did not see action until late August 1944. It had little success and on most missions they didn't even reach their targets.
Many of the large gun emplacements expected to cause trouble turned out to be WWI vintage and proved to not have the range or accuracy to hit Allied shipping. Here is an excellent illustration of the major shore battery duels. The destroyer USS Corry and the sub-chaser USS PC-1261 were the few ships hit and sunk. Some were knocked out early in the battle, such as the Merville Battery. Others lasted for days, such as the Maisy and Longues-sur-Mer batteries. Most were specifically designed not to fire out to sea, but rather to parallel to the coastline. This protected them from naval bombardment and provided enflade fire on the attacking infantry.
Other loses were due to friendly fire, collisions and a large storm which swept through June 19th to 25th.
The biggest "loss" of tonnage was deliberate. Several obsolete battleships were deliberately sunk to form a breakwater for the artificial harbors used to land supplies over the beaches. HMS Centurion, the French battleship Courbet, and HNLMS Sumatra were all sunk as breakwaters.