You need an up-to-date magnetic variation chart. Set the degrees to True North. This will give you your location to 200 miles. Magnetic North changes a little every year.
Next you need to know where the sun rises true east or sets true west, and the variation there for that day. There are charts in the Almanac to do this.
Next, check what angle the sun is at high noon. Is it to the North or the South? For this you need to know the angle difference to where you think you are. A sextant is best for this, but some rough calculations can be made with a compass.
Now you're still lost, but you know what area you are in. Choose a big piece of land & dead reckon sail to it. This is why I like a cheap transistor radio with a pull out antenna. At sea you can pick up stations at 200 miles, or sometimes at night up to 500 miles, and have an idea were they are. Head straight for one. Or if there are two or more, figure out your location to 20 miles. As you get closer to land you can fine tune the angles to get close to the port you wish to reach. I only go out 60 to 80 miles in good weather as far as the second reef, but you can do more.
The radio trick also works on land. If you have a map with what towns are in a certain area & what radio stations are located in them, mark that on your map. Then you only need to hold your course by a compass. I have found this true.
Once you are close to towns they have roads. Roads have homes on them. They can tell you where to go. The same is true if you're close to coast lines. There are small craft out there. Ask and they will tell you where to go.