What animal makes these spherical sand clusters?
Not sure what exact species it is, but those definitely look like crab holes. They create the holes in the sand to get away from the heat and predators. They clean their homes by depositing unwanted ~sand around their door (the hole).

So yes, you're totally right in assuming those were made by an animal.