Let's say an advanced civilization around Sirius wants to take us out. A chunk of metal (or anything really) of about 1000 metric tonnes would be completely invisible until it were very close. Travelling at 99.99% of the speed of light, it would impact with the energy of 13 times the meteor that wiped out the dinosaurs. The light of the projectile being "fired" would reach us in 10 years, and the projectile itself would arrive just 8 hours later. There is no foreseeable way to defend ourselves against that.
An overly cautious civilization with that kind of technology might just decide to start sterilizing all the planets in its surroundings without having to leave their solar system, just in case.
This used to be a common SciFi staple, that a civilization advanced enough to travel the stars must have solved their social issues first or they would have destroyed themselves with their own technology. Basically as the cost of ending all life on the planet drops you need to advance your ethics fast enough to prevent it from happening. Eventually everybody is carrying around pocket antimatter batteries and either everybody is well adjusted or everybody is dead.
An active weapon could be targeted at a solar system too far away for an accurate preparatory survey, then identify and target rocky planets and large artificial structures once it arrives. It could also perform course-corrections in transit, and remain substantially dormant for much of the trip for stealth and surprise.
Such a strike might not even be that expensive or need FTL technology: just send out a few one-way nuclear-armed suicide drones at 0.12 c [1], via a path that obscures their origin (e.g. via a gravitational slingshot or three).
[1] Perhaps with a design like https://en.wikipedia.org/wiki/Project_Daedalus, https://www.damninteresting.com/the-daedalus-starship/, which is probably even within our technical capabilities. We also have weapon designs that could render the a planet uninhabitable (e.g. https://en.wikipedia.org/wiki/Salted_bomb).