Maybe by using artificial micro-black hole as a bullet?
Benefits as an extreme high energy directed weapon, that avoids problems such as Newtonian momentum transfer relation to width of the low momentum projectile, relating it to superior density and quantum mechanical phenomena instead, both of which were enough on their own to avoid usual Earth-penetrating energy scattering problems without destroying Earth in the process. Brief explanation:
If you had enough time and resources, you could build a megastructure of hollow, nearly perfectly spherical shape in space and remove pretty much every atom inside the sphere to get it in as close to perfect vacuum as superhumanly possible. Then position the sphere and other related structures to the opposite side of Earth than what is visible to the godlike creature.
You could harness energy through massive array of solar-PV:s, capable to turn significant portion of whole radiative output of the Sun for quite some time in the form of antimatter.
Drain the Earths oceans from deuterium for fusion reactors to produce incomprehensible amounts of energy. Maybe add microwave laser receivers from other reactor sites on planets/moons using fusionable energy sources of other celestial bodies.
Then, you would need something called "nuclear lasers", nominated by the authors of the study speculating feasibility of "Black Hole Starships". I will add a link to arxiv library at the end of this message. It allows you to download the original study supported by some hard calculations in .pdf.
Those nuclear lasers would need to be capable to produce extremely high power and short burst of gamma ray lasers that can be very precisely aimed.
When you had collected energy storage with a mass equivalence of a few hundred thousand tons and capability to release it within "a-time-unit-of-extreme-short-lenght" with perfect simultaneous timing, aimed at the center of the hollow sphere from the inside walls, the gamma photons would meet at the center of the sphere in the focal point on top of each other at the same time.
Since photons are bosons, they are not restricted by Pauli exclusion principle like fermions, ie. quarks, leptons: stuff we like to think as "matter".
This would eliminate all the repulsive forces involved in black hole formation normally observed in gravitationally collapsing degenerate matter, when fermions use pretty much all the tools in their arsenal to avoid occupying the same place with identical quantum states, which makes it extremely difficult to create artificial black hole from matter.
Instead, when approaching the collective focal point, the photons would create a contracting ball surface, and the collective sum of mass-energy of those photons would start to form a gravity well, or a more like a "volume reducing spherical surface 3-d gravity trench", with the deeper the trench the closer the photons get to the focal point.
This gravity trench would further blue shift the photons to even faster frequency, contracting the wave lenght thus increasing their energy from released gravitational potential energy relative to each other, just like when core of any massive object collapse in to a smaller volume and it heats up.
If the focal point size, sufficiently small wavelength to fit inside that volume, and combined energy of photons within that region exceeded the Schwarzschild radius of given energy, then instead of going through each other and continuing to hit the opposite wall like normally would happen in the case of photons, the space-time curvature in that extremely small focal point volume would be high enough to form an event horizon that traps the photons. You would then have created a "Kugelblitz", a microscopic black hole made entirely of light rather than matter, in the center of the now exploded sphere.
That micro-BH would, -because of it's very small surface area- radiate Hawking radiation with the power output relatable to powerful nuclear explosion every second, power output only increasing when it would get smaller, until completely vaporized (which would take hundreds of years). Such a small black holes are theorized to be "anorectic" in a sense that they would probably not swallow almost anything even if placed inside a very dense stellar remnant, bacuse micro-BH:s extremely small cross-sectional probability to hit enough elementary particles to have any practical effect on their mass and momentum. It would only follow its free-fall geodesic and orbital trajectories without "noticing" if there even was some matter nearby, only affected by idealized gravity.
This small point-like object would have a event horizon diameter in an order of magnitude thousands of time smaller than a single proton.
micro-BH, or Kugelblitz, emitting extremely intense gamma radiation and creating sphere of aggressive pair formation of particle-antiparticle pairs around it would more likely explosively ionize everything from it's path inside a planet or a star, rather than actually touch or swallow any of it.
If that "glowing micro-hole" had such a velocity that after it penetrated Earth and emerged to surface from the other side would still exceed escape-velocity of the Earth, then you would have an all-penetrating continuous nuclear explosion vaporizing a not-too-large to cause apocalypse -sized cavity in front of it rising from the ground, through the godlike thingy, and shoot straight up to the sky without ever returning. Cavity behind it would probably just be re-filled by surrounding pressure fast, and Earth wouldn't have much, if any, serious damage from the event.. (at least in severity comparable to the picture above of hypervelocity kinetic impactor..).
It would be the matter of plate tectonics and position of the godthingy relative to them what would be expected to happen to Earth destruction wise. Maybe the BH would pop from the ground with a fountain of molten magma behind it, cause earthquakes, tsunamis and possibly increase volcanic activity, but probably not anything too serious to wipe out humanity let alone all life.