Yes, worms possess heart-like structures called aortic arches that function as hearts.
Earthworms, for instance, do not have a single heart as humans do. Instead, they have multiple aortic arches that pump blood throughout their bodies. Typically, they have five of these arches that contract rhythmically to circulate blood. These aortic arches aren't exactly the same as a mammalian heart, but they perform the essential function of circulating blood. The circulatory system of an earthworm is closed, meaning the blood remains within vessels as it circulates. This system effectively transports oxygen, nutrients, and waste products throughout the worm's body.