Woah. That is like, really WIP.
I'll pitch in some. Feel free to use it or just ignore it.
The worm would be divided into 4 sections, Solar (Front), Stardust, Vortex, and Nebula. The solar would extend out a solar whip thing, attempting to grab the player, and if doing so, drag it twoards it at a rate of 3 blocks per second (you could still move freely, you'd just have a mighty wind type thing), the nebula would occasionally shoot a laser dealing massive damage, and occasionally attempt to teleport the worm. If it suceeds, the order of the parts is scrambled. It can be stopped by dealing 10k damage to it during the 6 second chargeup. The vortex shoots bullets rapidly in all directions, and the stardust summons buffed probes.
Expert: Occasionally the 4 worms will split up and later rejoin in a new order.
A section can be deactivated by dealing enough damage to it, and it will stop doing its attack but still do its other functions at that point.
Note: The solar eruption and stardust dragon would both be op in this fight because it is a worm. Maybe each section could only have a certian weak point to it?
Loot: Lots of fragments, Luminite bars (but only post moonlord), treasure bag, trophy, mask, super healing potions