If it were mine, I'd take the door off the hinges to make it easier to put in a dumpster. Then use a flat bar, assuming the frame is nailed into the opening, and take the frame out. Optionally, especially if it's screwed in, a sawzall works well.
Repair any damaged/rotted wood and put a new pre-hung unit in.
When I did this many years ago as a side gig, I almost always used ThermaTru fiberglass doors.
Plumb it, square it, shim it and use 3" deck screws to secure it. Replace the hinge screws with 3" as well. 3" on the strike plates for the lock too.