They had other tools beside axes including hand saws, chisels, etc.
And they had sawmills also. They could power the saw with things other than electricity - the most common method was to build the sawmill next to a river and build a large water wheel, when they open a chute (valve) it directed river water onto the wheel and started spinning, and that wheel was attached to a round saw blade. It took a while to get going, but once it was going the momentum of the large water wheel provided enough power to cut logs.
As for lifting an moving logs - they used large animals like horses or oxen. They also used basic mechanical tools such as a lever to lift one end, then place another small log under it to serve as a wheel to move the log to the construction site, then use a series of Pulleys to lift the log into place. Or they could lift one end, support it, then lift the other end and place supports under that end, slowly working the log upward by lifting one end at a time and putting supports under it until it was ready to add to the wall of the log cabin structure.
It was a lot more physical labor but it worked.