Simply put, a small hole through a planet is nowhere near the force to destroy it. To destroy a planet you have to overcome it's gravitational binding energy. The failure of people to understand this means you don't know basic math
This means the actual explosion was done by the Viltrumites
"But the core"
A destabilized core is irrelevant, virtually no mass was taken out, meaning the infinity ray did practically no damage to Viltrum.
Further supported by Thaddeus saying the core would restabilize in seconds, meaning the damage the infinity ray did is equivalent to giving Wolverine a papercut
"But the narrative"
The narrative hyping up the infinity ray was illogical, we objectively see that it is less powerful than the viltrumites. No ifs or buts about it.
In powerscaling we go by feats. And by feats, the infnity ray made a small hole through viltrum, doing essentially nothing. While the Viltrumites contributed 99.9% of the force required to tear it apart