On many islands it’s goats, on others it’s other animals. Often their roaming is part of the island culture (although they were often not there originally, yet imported later).
Yet, unless these animals are fed in pens or contained areas and stopped from roaming, they do untold damage to the habitat by eating foliage (inhibiting growth of plants and trees which in turn diminishes the island’s ability to convert emitted carbon dioxide to oxygen) and by affecting the ground and adding their faeces to run-off and storm water which eventually ends up in the waters around the island.
It’s often a delicate subject and to be managed with great personal one-to-one care. This takes time, some financing and the appropriate people to carry out the work; often door-to-door.