Sorry for the loss, but a few notes on this.
When you bought the clam, did you check yourself the foot of the clam? Was it damaged? Was it attached to stones or blank?
Did you check for parasites like snails yourself? Make sure you check around the foot for eggs and/or snails!
Usually clams like yours (from the picture I assume a Tridacna corocea) live in rock caves and only the top will be visible. So a good shop keeper will keep the clams in little clay bowls filled with large gravel.
This way the clam has something to attach to but still can be moved out.
Another thing, you have to acclimate the clam like a shrimp before adding it to your tank, water values have to be right as in pH, KH, Mg, Ca. Though having them not right won't kill the clam within 2 weeks.
What can not be underestimated are air bubbles in the water. Those can be very stressing for clams. T. corocea is also very picky when it comes to debris in the water, particles. They are not able to digest those like other filter feeders and other clams being filter feeders. They sort of missing the cleaning mechanism living in such water conditions like other clams. Again, I doubt that will kill a clam within 2 weeks.
Most root cause why a clam will die within a short time after purchase is the clam being already not handled properly at the LFS and was weakened already.
Another tip when you want to try a clam again. Never put it directly into your rock scape. Always on a seperate stone so you can move the clam easily or take it out. The reason why? If you notice at night little white cone shaped snails then you will be happy to be able to take it out and brush those off. Nasty parasite which will sooner or later kill the clam. Having it put into the rock scape on a huge stone you can't remove and the clam has already fully dug its foot into the rock, good luck then. Took me 3 weeks of slowly pulling my clam of the rock to brush those snails off now once a week. Just my luck.