beforehand vs earlier

beforehand

adv
  • At an earlier or preceding time. 

earlier

adv
  • previously; before now; sooner 

adj
  • occurring previously 

How often have the words beforehand and earlier occurred in a corpus of books? (source: Google Ngram Viewer )