Two answers, depending on what you are asking.
I) Displacement is a distance formula problem. If I walk 100 miles, but end up where I started, the displacement is zero.
What at is the distance between the starting location and the ending location? That is all that matters. It does not matter if you went straight from point A to point B, or if you took a convoluted path and retraced your steps many times.
Starting position, ending position, distance formula.
II) Unless you are talking about the displacement of a volume of water.
The volume of an irregular solid may be insanely difficult to figure out with nooks and crannies and little fiddley-bits. But if you immerse it in water, it will displace exactly the volume of water equal to its own volume. For a small object you might drop it in a graduated cylinder to measure the increase in volume. For something larger fill a tank with water; immerse the object fully and catch the overflow; measure the water that flowed out when you immersed the object. You must be careful while immersing the object to make certain air is not trapped in some pocket because that air will show up as volume of the solid.