How to make a proper foundation in Valheim
Making a proper foundation for building is the first and most important part of building in Valheim. Without a proper foundation it's very likely that you will be unable to properly fit the roof on your building when you are almost completely done with construction. In my own personal experience when learning how to properly build this is where I went wrong most of the time. I'd often start building without an idea in mind of what I wanted my structure to look like and this always came back to bite me in the butt at the end when I was trying to roof my structure.
When you find a location to build the first thing you need to do is level the ground using your Hoe. How the Hoe works is pretty straight forward -- it will raise or lower the ground in the area you specify to the level of the ground you're standing on. You can use this logic to your advantage, if you want to raise the ground a little bit then stand on a part of the ground which is higher than the rest and use the Hoe around you. Vice versa if you'd like to lower the ground a little bit.
Sometimes you'll need to go a step further and actually raise the ground with the Hoe or lower it by using your Pickaxe. This is fairly common when you're building large structures and I talk about it indepth in my Valheim Building Series where I cover proper foundations. All of this is more easily explained in videos so be sure to watch my video guides as many times as you need for proper foundation building.
Tip: When playing on Survival Mode in Valheim it's typically always recommended you Raise ground at least a little bit to provide your building some safety from enemies and base attacks. If you don't raise the ground that your base sits on then you'll have to either make a moat around your base by lowering the ground or raise the ground around your base so enemies can't get inside.
Valheim Building Series (Videos on foundation):
How to make a proper foundation (Part 1.0)
How to make a proper foundation (Part 1.1)
How to make a proper foundation with Iron (Part 1.2)
How to make a proper foundation on Survival Mode (Part 1.3)
Below I have provided some screen shots of what a proper foundation looks like once it is completed. A proper foundation should have an outline of the entire structure you plan to make. As you can see in all of my screen shots below I have Stone wall 2 x 1 pieces which outline where the walls of my buildings will go. Once I am finished with the foundation all that's left is building the walls on these structures then building the roof.