How to figure out the key specifically in this song? I know that the key signature has a sharpened F, but this means that it could either be in G major or E minor. The beginning note and the ending note don't start on the tonic of the key.
That song is definitely in G major. The anacrucis at the start leads straight to a G in the first full bar. (1st clue). The last note - even though it looks odd, it must be a note due to wording underneath- is also G. (2nd clue). There are no D#s which would indicate not Em, due to most songs in Em needing and having a sharpened leading note, D# in Em (3rd clue).The repeated first line also ends on G (4th clue). There is no doubt here.
However - were there D#s it could easily have been in Em. The main clue there being ending on E. It could also have been in several different modes of G major, with F# as key sig., but clues would be tonal centre. For example, if the tonal centre (home feeling) was A, then it could have been A Dorian.
The sample you provided is in G major. As you said, if all you know is the key signature then the key could be G major or E minor. But - the last note is a G (except the open notehead indicating the duration is not a familiar semibreve). If you sing or play through the tune, it's definitely in a major key. If it were in E minor, you'd almost certainly have one or more pairs of D# followed E. None of the D's in the tune is a D# - so it can't be E minor.