This is a worm. At least the reef guidebook says so. They contract and disappear when danger is about. The worm is on the reef in the shallows. It seems they like the sun. It looks complicated and it surely doesn’t look like it moves. They are seen in different colors. They are tiny and easy to miss. You still have to sneak up on it or it will contract and disappear.