When I search the key of a song on Google, I always get 2 keys which have a relative relationship. For example, when I search the key of the song Emotions by Mariah Carey, I get C major and A minor. Is it because it's hard to hear the difference? Also, when I look up a song which is in E minor, I also get results which tells me it is in G major.
If you're sure that a piece (or section of a piece) is using the C Major/A minor scale, then which it is* depends on what note you hear as the 'home' note.
In the case of the Mariah Carey piece, I personally can clearly hear the main chord pattern coming back to an 'A' root (and A minor chord), and there's no chord based on C in the main pattern, so I struggle to see how someone could hear 'C' as the root. (There are some other things going on harmonically elsewhere in the piece - I'm just talking about the main pattern). So I'm happy to call it A minor.
There might be other cases, though, where it's not so clear. You can point to many factors which indicate which out of the two possibilities is the home note - phrasing, which notes are on the strong beats, what other chords are used, types of cadences, etc... but ultimately they may not be decisive, and it can be a subjective thing as to how they're interpreted by the ear.
One thing that might often swing the balance would be the flexibility be in the 6ths and 7ths. If you start hearing F# or G#, that could be a clue to the use of A minor rather than C major.
Nevertheless, I think the answer to your question is.... 'usually'.
(*of course, a piece with no sharps and flats might be D dorian, if D sounds like home, or G Mixolydian if it comes back to G).
Relative keys share a scale: a song in C major generally uses mostly the C Ionian scale,
X:1 L:1/4 M: K:C %%score T1 T2 A B V:T1 clef=treble % 1 [V:T1] C D E F G A B c d e f g a b c'
and a song in A minor will at least part-wise use the A Aeolian scale, aka natural minor scale.
X:1 L:1/4 M: K:Am %%score T1 T2 A B V:T1 clef=treble % 1 [V:T1] A B c d e f g a
Both of these contain the exact same notes (at least on 12-edo instruments, but actually also in many other tuning systems). Thus, a naïve analysis based on “what notes are used in the piece” won't necessarily be able to distingiush between relative keys.
That doesn't mean one can't hear the difference though. Some pieces are really ambiguous, but many aren't. For instance, if a piece has the melody ending on C and never uses an Am harmony, it's pretty safe to say the piece is in C major.
X:1 T:Twinkle Twinkle L:1/4 M:C K:C %%score T1 T2 A B V:T1 clef=treble % 1 [V:T1] "C"C C G G | "F"A A "C"G2 | "F"F F "C"E E | "G"D D "C"C2
X:1 T:Greensleeves L:1/4 M:3/4 K:Am %%score T1 T2 A B V:T1 clef=treble % 1 [V:T1] A | "Am"c2 d | e3/2 ^f/2 e | "G"d2 B | G3/2 A/2 B | "Am"c3/2 B/2 A | "E"^G3/2 ^F/2 ^G | "Am"A3