And also bring a waterproof paper map because it's lighter, easier to read, more resilient, and more fun.
With respect to compass, I'm not sure how critical real orienteering is for most people. It's more about not being totally turned around and/or being able to make sure you hit some feature like a road.
As for orienteering: I learned it once and never used it. (btw, the Sierra Club course where I learned it got cancelled when someone sued over an injury in ice ax practice.)
The little handheld trail GPS my parents got me after my first such misadventure has proven incredibly useful for figuring out where I made the wrong move. (The first such misadventure, I was using the paper map to work out if there was a bend I missed).
And it's good/useful to know that you can always try to use GPS even in airplane mode. Just GPS is recieve-only so it's passive (but the location service uses multiple sources of information apart from just GPS or GPS-like if it can.)
Or you can use an "offline-only" app like OSMAnd and feed it with GPX tracks downloaded from hiking sites, then you only have to worry about keeping your battery charged...
So Google Maps offline may actually be useless for hiking? This would also explain why I had trouble using Google Maps offline on my last bike trip.