That is the transducer for you depth gauge. It reads depth right through the hull. Typically mounted in a puddle of epoxy - it looks like it just popped off the smooth surface. I would take some course grit sand paper (80 grit or so) and rough up the area where it was mounted. Then clean that area really good with alcohol...mix up some two-part epoxy and re-attach. Done.
2005 ProStar 197 w/1:1 MCX; Acme #843; 2007 MC ZeroFlex Tower