That first one def has pinched mantle. The second looks okay.
Light: both are on the sand so I don't think it's light
Water Quality: if it was really bad then I'd expect them to both look poor. However, this is still worth checking since one might be more delicate than the other. And they're different species so that would make sense that one might be more delicate. Test your Alk, Ca (not as important IMO), and Mg. Clams use a lot of the Alk and Mg. Also test your phosphates and nitrates. You want nitrates at less than 15, less than 10 ideal. And you want phosphates at less than 0.05 but more than 0.00. Too little of both and they starve...to much and it's toxic.
Pests: Another likely scenario. Check at night after like an hour of lights out to see if you see any pests on them. This might be pyramid snails or worms, etc. Look for anything that might be irritating it.
Barring these also check to see if there's any other livestock that might be stinging them. Maybe the leather right by it is putting out toxic juice or perhaps the scoly (?) has long tentacles at night while feeding that are annoying the clam.
Not much you can actively do as far as I know but keep an eye on it. If it croaks you'll want to pull it out asap or it's phosphate/nitrate city up in there. Good luck!