As others said, if the larvae can survive the destruction of a planet by Death Star-type laser, blowing the star up won't help, and may even make things worse.
Fortunately, you are from a Type III civilisation, so you have better tools than crude star-blowers at your disposition.
If your resources at hand are limited, a cheap option is to use some local stellar engineering: dismantle a few planets to build a magnetic field controller around the star, and use it to push the plasma away, make a big hole and unveil the core of the star. While the surface of the star is at a frigid few thousand K, the core of the star is at millions of K, and it is under gargantuan pressures. This is where the actual fusion happens, but energy moves outwards through the layers of the stars ever so slowly, as it is, at this scale, incredibly opaque and insulating.
Once unveiled, with the sudden absence of pressure, it will violently expand. The effect will be akin to a solar flare, expect much, much bigger. Or, if you prefer, a star flamethrower.
This will roast any planet you are pointing it at, but it won't be enough to kill the larvae, or even blow the planet up, in fact. But you can use one device per planet and keep them firing for a long, long time. At some point, the star will start dimming as the now punctured core cannot sustain enough pressure to keep the same fusion rate. Decreasing the rate or pausing for some time should fix it, though. The star will also end up loosing mass, which may also be mitigated by dropping interstellar hydrogen or even recycling escaped hydrogen back into it, but the loss rate will still probably be too big to fully balance.
The idea is that maybe the larvae can survive an instant, violent event but not a continuous burning for a long time. The planet will slowly evaporate (be careful to not let spores escape in its tail), though it would probably be too long to evaporate them completely that way.
Even if it doesn't kill the spores, it should still work as a short-term, stopgap option, giving you a few thousand or million years to work on actual solutions.
Be careful though, this de-orbit the planets by pushing them away. Again, you can impact them with other celestial bodies, or more elegantly use those bodies as gravity tractors to pull them back in closer orbit. In any case, it is recommended to start building a Dyson Sphere around the non-holed parts of the star for powering local facilities.
As was mentioned already, Nicoll-Dyson Beams are useful tools in this case. As a Type III civ, you should have a few of those in range, or be able to build them if it happens to be an undeveloped sector, or they are all busy with more important projects. You can even use the aforementioned local Dyson sphere you are probably already building around the star.
Now, you could use those to cook the target planets, similarly to the flamethrower option but with more power. You should be able to end up evaporating the planet given enough time, though again be careful with flying spores.
Another option is to use them to move the target planets, either with direct localised evaporation and radiation pressure (as in a rocket or a laser sail), or by moving other celestial bodies and use them as gravity tractors. That way, you can drop the planets right in the star's core, and slow their fall down enough that they stay there. Again, make sure no spore escape into the star's atmosphere, but after long enough, it should be entirely sterilised.
The advantage here is fast response time, and once it is in the star core, light surveillance should be enough to make sure nothing escaped, freeing your time and resources for other projects.
Dead star billiard
If you fear that dropping it into the star won't be effective enough, I recommend sending a star remnant to the system and hitting the planets with it. While it may be tempting to hit them as fast as possible, and this should normally be enough, those larvae are good at surviving brief, violent events and may escape with the debris. In additions, relativistic debris spraying around are messy to clean up, and local sector population may complain, with good reason.
A better solution is to slow the remnant down as it arrives, and hit the planets with it in such a way that all will fall and stay into the star core. This can be seen as an upgrade of the previous option in that regard. The advantage is that the star mass will, to some extent, help keeping debris from flying around.
Be especially careful, though, as even a slow, controlled approach will have the planets breaking apart due to tidal forces, and the larvae may use the occasion to try and escape with great velocity by using varied tricks with the debris and the immense gravity of the remnant.
Note that if your star is not massive enough, you may want to feed it local interstellar matter, or merge it with another star. Keeping the planetary system in order can be a bit tricky, but nothing unfeasible.
Note however that merging two stars, in particular here when one is a remnant, cause a violent, energetic burst that you will want to plan for. Again, stellar manipulators like those used in the flamethrower option should help.
There are basically three types of remnants you can use, depending on what is lying around:
White dwarfs are the most abundant. They should be similarly sized as the target planet, but with a thousand times the gravity. This makes it the easiest to use, and the default choice if you are certain the larvae won't survive it. Honestly, I don't think anything like that could, but just in case...
Neutron stars are tiny and with an absurdly high magnetic field. Magnetars are a type of neutron star with an even more absurdly high magnetic field, be careful with those. The magnetic field can play both for and against you or the larvae, depending on the details. However, once the star and the planet are in contact, the planet should be crushed in short order at the neutron star's surface, releasing lots of energy in the process, including in exotically strong forms. (Again, be careful that the larvae don't use it to help or help concealing their escape) Honestly, I can't even imagine any spore type to be able to survive it, but if you really want to be sure...
Black holes are even tinier than neutron stars, and anything that enters will exit in a long, long time as scrambled Hawking radiation. Otherwise, it should be used pretty much like a neutron star, with less of a magnetic field. Easier or harder to work with, depending on the details.
Big black holes, depending on local availability
Depending on where the star system is, there may be a supermassive black hole in the vicinity. Even an intermediate black hole should work, as long as the event horizon is wide enough.
In this case, an efficient solution may be to simply drop the planets in it. For this, build a Skhadov thruster around the star. The simplest design is a partial Dyson sphere letting light out in the opposite direction of the movement (similar to a photon rocket). Using the flamethrower system may have better thrust, if less range (similar to a nuclear fusion rocket), but you only need to go as far as the target black hole anyway.
Once you are there, you simply have to move the target planet on a direct collision course - this time, the faster the better. The bigger the black hole, the less tidal effects, so the planet shouldn't make too much debris when crossing the Roche limit and starting to break apart. As always, of course, be careful of tricks from the larvae at this point, but once it has crossed the event horizon, you should be fine.
Whether to let the star pas the black hole by, put it in orbit or drop it with the entire system in the black hole just in case it would still be infected is up to you. If you do choose to drop the star an it is an intermediate black hole, though, be careful. The event horizon is probably too small for the entire star, so use your stellar manipulators to siphon it until there is only the core left. The core is more or less a white dwarf, and should be small enough that you can simply drop it.