Houses would only be built entirely out of wood if it was in an area where wood was plentiful. Otherwise other materials like bricks were used for walls.
However, as far as I know wood beams or trusses were the most widely used material for supporting roofs before steel beams and trusses became an option. There were other options like arches or vaults, which were intersecting arches, but those took up a lot of space.
How were the wooden pieces joined together without iron nails?
There is an entire subset of carpentry called joinery, which is still practiced today in specialty applications. Traditional joints are made without metal fasteners and often without glue. You may want to check out r/woodworking; I'm sure people there would love to tell you all about dovetail joints, mortise and tenon joints, and everything in between.
This image illustrates one type of mortise and tenon joint that would be used in post and beam construction, a common method in much of Northern Europe. Notice how the tenon (narrow part) of the horizontal beam not only fits into the mortise (hole) in the vertical post, but also will rest on a notch. This efficiently transfers weight from the beam to the post. Pegs go through the joint to hold it in place, but typically would not actually bear any weight. Here is a photo of a similar joint in real life.
This system of mortise and tenon joints held in place with pegs was used to build surprisingly (to a modern audience) large and complex structures without any metal fasteners. The roof of the palace of Westminster uses a specialized style called hammerbeam construction. The details of the joints are not easily visible, but they are held together in essentially the same way as the photo above. Likewise, the Kizhi Pogost churches in Russia were built in the early 18th century using only wooden joints. The walls are made of logs notched near the ends and fitted together (if you ever played with Lincoln Logs as a kid you'll know what I mean). Even the shingles on the roof are held in place with wooden pegs.
So people are perfectly capable of building large structures by fitting together pieces of wood that have been carefully shaped. With the increasing availability and decreasing cost of nails, screws, and other fasteners in the 19th and 20th centuries, this type of skilled joinery became largely unnecessary in typical construction.
Edit: fixed link.