First of all, only for the person dealing the last blow it will count as having killed it.
Before it became a Steam achievement, it was already an in-game achievement.
We've killed numerous sandworms, black wolves, scorpions etc, but it has always been the case that the player dealing the death blow was the one who got the in-game achievement.
If your mounts killed the Sandworm, that's a possible reason why you as a player did not get the achievement.
Another thing: When you go in solo (without other players, without mounts) and you use for example fire arrows and the last tick of health is taken away by fire, it does not count for you as player; it's the fire that dealt the last blow.
Keep that in mind when soloing the Sandworm.
Lucky for you the Sandworm is the easiest world boss to take down, once you know it's attack pattern.
How I personally deal with sandworms (I kill them just for fun, since I've already got the achievement and they're very easy to avoid):
Go...