The Twins are one of Terraria's three mechanical-boss encounters. Retinazer and Spazmatism have separate health pools and different attack styles, so the fight is easier when you treat them as two threats rather than one target.
Summoning
The Twins can be summoned with a Mechanical Eye at night.
Retinazer versus Spazmatism
Retinazer emphasizes ranged laser pressure, while Spazmatism is more aggressive at close range. Decide which one creates the bigger problem for your loadout and consider focusing that eye first.
Arena preparation
- Use a long arena with room to change elevation.
- Prioritize mobility over a cramped high-damage setup.
- Bring healing for a sustained fight.
- Use a weapon that can keep damage uptime while moving.
Mechanical-boss progression
The Twins are part of the same broad stage as The Destroyer and Skeletron Prime. There is no need to force one universal order—choose the encounter that fits your current equipment best.
Source: Official Terraria Wiki.