Minecraft wiki entry for Things_not_to_do, associated text: Coordinate notation: Coordinates can be displayed in the game settings without enabling cheats.‌[Bedrock Edition only] The player can also record their base's coordinates from the Debug screen‌[Java Edition only] (this is done through F3 or Fn + F3, depending on BIOS settings). The coordinates are also reported when the player teleports using /teleport @s ~ ~ ~, and also copied to the clipboard in the form of /teleport when F3 + C is pressed, if cheats are enabled. A screenshot can be used or writing down, but the coordinates should be kept in a secure place. If the player does not want to write it down in real life or take a screenshot, they can craft a book and quill and write the coordinates of their home down there.
Lit landmark: Perhaps for smaller distances, one can build tall towers with some torches on the top while traveling, as well as placing one on top of their house. Keep in mind that the towers can be seen only if one's render distance is high enough. A beacon can also be used for this purpose, although a beacon is unobtainable for new players in survival mode. Alternatively, place a torch on the side of a block indicating the direction to the nearest safe haven.
On grassy earth, mark arrows by digging path squares with a shovel, or use the shovel on grass to make grass path blocks every few paces to mark your way.
Keeping a running list of important coordinates is recommended.
Make a compass: Four iron ingots and a piece of redstone are the ingredients needed to craft a compass. It points toward the world's spawn point, or a lodestone if used on one. The spawn point cannot be changed by sleeping in beds (which changes the individual spawn point), making a compass only useful if the player built their house close to their original spawn or is late enough in the game to have obtained a lodestone. It should be noted that the world spawn can be changed if cheats are enabled by using the /setworldspawn command.
If the player has a compass and 8 paper, they can craft a map to prevent getting lost. Additionally, a single paper and a compass can be combined in a cartography table to make a map. A zoomed-out map can also be crafted by surrounding a map with 8 paper on a crafting table, or by combining a map with one paper in a cartography table.(Note: In Bedrock Edition the player can choose to start with a map.)
While traveling, leave a trail of cheap but visible blocks, such as wood planks or cobblestone, every few blocks (torches also work). These blocks should not be native to the biome to make them stand out.
Keep track of navigation directions. Clouds always move slowly from east to west, as do the sun and the moon. Sunflowers also always face east.
Crafting a book and quill allows the player to take notes. Craft a book with one leather and three paper, then combine the book with a feather and an ink sac to make a book and quill.