How can I find out what the key of a song is? The method I'm most familiar and comfortable with is playing each pitch along with the song and then checking which pitch sounds the most stable at all points in the song. Is there anybody out there who would like to share their approch or insight on how to better my approach?
I think your approach is the best one there is. However, I will admit that it doesn't always produce the best answer. Usually, but not always.
One very simplistic approach is to see what the final note of the melody is. Unless the song uses a fade-out at the end, the last note of the melody is very often (maybe 85% of the time or so?) the tonic note of the whole piece. That is, if the melody ends on G and is in a major key, then the piece was likely in G major. Etc.
One caveat to this: Celtic music often ends on the dominant chord, in which case the final note of the melody would be a fifth above (or fourth below) the tonic of the piece as a whole. There are other exceptions also, but I often find that using this method helps, if it isn't definitive.
Your way is good. If you're a bit more musically literate you can go through the piece looking for perfect cadences, leading-note to tonic resolutions etc. Your way is just an intuitive version of this.
But note that 'key' is often a fluid concept. It's generally easy to define the overall key of a traditional hymn tune (though it may 'go visiting' in the middle sections). But it can be almost arbitrary in some 'folk music' styles whether a song settles on (say) C major or A minor. (Or some other mode using the same notes.) A lot of pop/rock music lacks a firm tonal centre. Much 'modern classical' goes out of its way not to have one!
What I'm saying is, there won't always be a 'right' answer. Therefore, if I may anticipate your intention, there won't always be an easy set of rules telling you what chords are 'allowed' in a particular song. Sorry!
When you have sheet music, there's a technique for deriving it from the pile of sharps or flats at the top.
If there's sharps in the key signature, what you do is find the last sharp and the note one half step above that sharp note is the key. For example,
One half step above C# is D. So D Major.
One half step above B# is C, which, in this key, already has a sharp, so C# Major it is.
Most people just memorize them.
For flats, it's a little different. You can find the second to last flat, and that's the major key signature. Flats are easy!
The second to last flat is on G, so Gb Major.
This trick works for all of them except, of course, F Major, which has one flat:
Just remember that one flat is F Major.
For minor key signatures, you can count up six scale degrees on the major key signature, or count down three half steps. I usually count down, because for me that's easier, but it's technically more correct to view the minor key signature as starting on the sixth scale degree. Anyway, if you figure out the major key signature, you can figure out the minor key signature.