Here are few different methods:
Method 1:
Press F3 and look at the 9th line down on the left side. You should see XYZ: (number) / (number) / (number)
The first number is the X-coordinate, the second is the Y-coordinate, and the third is the Z-coordinate.
Stand in your house and write down the coordinates. You could make a file on your computer, write it on a piece of paper, use a book and quill in-game, etc. You can now easily find your house with the coordinates. You can learn how to use coordinates by walking around in your minecraft world and looking at how the coordinates change, or you can watch this video: https://www.youtube.com/watch?v=B8xLxesnOg4 Here is the website used in the video:
https://blocktools.deep-orbit.com/#direction This link is also in the description of the video.
Method 2:
If you have cheats enabled for your minecraft world, you can stand in your house and type /spawnpoint in chat. If you get lost, type /kill in order to get back to your house. If you want to keep your inventory when doing this, type /gamerule keepInventory .
Method 3:
If you aren't wandering too far but still getting lost simply create a trail of torches wherever you go. Don't forget to destroy the torches on your way back if you are doing a one-time exploration trip.
I hope this helps!