Minecraft wiki entry for How_to_get_rid_of_a_rogue_wither, associated text: A diamond or netherite sword or axe enchanted with Smite V. Sharpness V will do in a pinch, but the extra damage against undead mobs is preferable. Only use it at close range, and be prepared to use your bow as your main weapon.