https://www.musical-u.com/learn/identify-major-and-minor-keys-two-shortcuts/
Learning to identify major and minor keys is an essential skill for musicians.
Once you know the key of a song you’re free to play it by ear or improvise over it. Keys come in two “flavors”, major and minor and so it’s valuable to learn to identify major and minor keys by ear.
https://www.musical-u.com/learn/identify-major-and-minor-keys-two-shortcuts/