Whats the best way to get this fitting off

If you heat and pipe wrench that fitting, find a steel dowel that fits snug inside of it first. The pipe wrench will crush it if you don’t. Soak it in penetrating oil first and with heat and slow easy pressure it’ll come out.