Always both.
Technology, of course, can fail.
At the latitude I live in (close to 70 North) compasses are problematic. Declination is big, and the compass needle wants to start pointing vertically, compounding error.
So GPS is king up here these days, but we plot course on a map, and use compass as a backup - provided we know our coordinates so as to make the appropriate corrections.