Been looking for this forever, it was part of an anthology I think and used such generic names that it seems impossible for me to find without knowing the book name.
It's about a shape shifting machine wandering the surface of a planet sized space ship. At the end it’s accidentally killed by people trying to mess with it I think.
I think it was wandering the surface at first long before humans were there until one day it found an engine of the ship and realised that there must be an inside when it saw humans going in, then it wandered all the rooms inside the space ship, avoiding people when they looked for it. Eventually the humans trick and contain it.
I think the ship was just referred to as The Ship, and I’m not sure but the robot might have called itself “Alone”?