For me, when a song has, say, three accompanying chords, they are generally I, IV and V of a particular key. Thus, in a song with C, D and G, it's squarely in G major. Others have reasoned that some songs (with say, those same chords) are actually in D. Thus D=I, C=bVII and G=IV. I don't buy that, as the bVii is 'borrowed' from the parallel minor. No big crime, but a little convoluted nevertheless.
There are songs with only two chords, so to me, they are I and V - rather than I and IV, but that's open to debate. Once there are more than 3 chords, life gets easier, maybe... Along with C D and G is Bm. Ah, that's not in C, but could be in D or G.
Obviously, the final chord is (usually) a deciding factor, but some tracks use a different one, so no great help there. The first isn't always helpful, either. I get fed up with people telling me 'Pretty Woman'( Orbison) is in E! The last band I played it with, I actually started the intro ON B, so it could be in E. They said I was wrong...
But, enough gripes. What are the best criteria to use to define a song's key please? And looking at the sheet music is not an answer I need!