what you need.
8 iron blocks, 2 pumpkins full set of diamond armor( enchanting optional), diamond Sword( smite recommended but not needed), 1 potion of regeneration/ Beacon with with health regeneration on, 4 insta-health lvl 2 splash potions ( not needed but it will save your golems) 4 soulsand and 3 wither skulls.
How to Fight it.
first dig about 40 blocks down into your battlefield of choice( i use the overworld). then make yourself a hole that is 5 wide, 4 high, and 11-15 long. spawn you 2 iron golems on opposite sides of the room. then place your soulsand T shape and when ready Summon your wither. while it is charging up the iron golems will start attacking it. this is when you take your regen potion. while it finishes summoning your battle begins. since the room is so small the golem will attack the Wither while it try to "eat" itself away from them. it mostly eats sideways. after the wither 2/3 health use your splash potions on it. this while heal your golems some hearts and also damage the wither. after it hits half health it cant fly anymore so golems will hit it more.
all in all the fight should take about 30 sec to 1 min.
the main reason this is the best way to fight the wither is that Iron golems tank soo much damage.
meaning your only taking 1/3 of the full damage the wither can do all fight.
Final thoughts on the wither.
The Withers Power Lvl is in a good place Right now. This Fight is intended to happen in super late game. Meaning if it was any easier that it would be like the ender dragon( easy and not fun to fight).
Comment if you have any questions.