Where are you? At many harbors there is a hoist for small boats that is a small crane on a pier. If you have something like that near you, another option is to pull the boat
up to the pier, tie a loop of rope
around the mast that can slide up to the spreaders. Attach the hook on the crane to the loop and raise it up to the spreaders. Then loosen the turnbuckles and pull out the pins that hold the turnbuckles to the metal fittings on the boat called chainplates. With the crane you can gently hoist the mast and if you have any wires in the mast hopefully you can disconnect them and then lift
the mast up. Then by hand you can lift
one end of the mast up and begin to lower the mast down onto the deck
of the boat (or somewhere else.) As you probably have seen in the videos suggested before, you can use a-frames and other techniques to do it on the boat itself. The dinghy
crane way usually has less chance for calamity or drama.