I haven't used a compass in years except to prove I knew which direction the building was in for my boss.
Knowing when specific stars are at night and where the sun is (where shadows point) will tell you where north is. Knowing this stuff is why I can't really get lost. One time I tried but even in dense forest, the shadows never lie
Sun is not always visible, where I live there is frequently completely uniform grey skies. Also depending on your latitude and time of year you'll have to adjust or you'll be quite a bit off.
In my city it's even easier, there's a friggin huge volcano right to the west, the city it's built at its foot. Just look at the volcano and left is south, right is north
And if you don't know which direction to go just go downhill. It has the highest chance of finding a river and humans always liked to settle on rivers.