There is a thing called relative pitch. It's what pitch you hum without a reference. Watch a barbershop quartet, choir or about any group of people singing acapella (without instrumentation). They start with one person blowing a pitch pipe or humming so everyone else can hear a pitch to adjust their pitch against.
Step 1: Listen to music and hum along with the music whether you know the song or not. Is you first note higher or lower in pitch than the song? Your hum will adjust to the song.
Step 2: Play with other musicians. Watch their feet or their heads. Most musicians nod their head or pat a foot to help keep time. Play along with whatever song is played as close to the beat as you can.
Step 3: Whatever instrument you play strive to play your first note as quick as you can after the song starts. But don't play it LOUD, instead play it just loud enough that you can hear it over the music. If you're playing a guitar or keyboard or any other instrument that can play chords play just one note, not a chord. It doesn't matter what key everyone else is playing in. Your listening to discover if your first note is higher or lower in pitch relative to the song, just like when you listen to music and are humming. The difference is you're using your instrument to make a sound instead of you humming. Then run through (up to an octave) notes until your instrument plays the same root not whatever chord the song is at.
That's how most people I know learn to play music by ear. In the beginning you can't care as much about what the chords are. You develop relative pitch and a sense of timing first.
By the way, Cat Stevens does not create beginning music in my opinion. I would start with campfire songs, seasonal songs or other songs that have two and three chords you might be familiar with. Has Cat Stevens even published any two or three chord songs?
Jim Fogle - 2025 BiaB (Build 1128) RB (Build 5) - Ultra+ PAK
DAWs: Cakewalk Sonar - Standalone: Zoom MRS-8
Laptop: i3 Win 10, 8GB ram 500GB HDD
Desktop: i7 Win 11, 12GB ram 256GB SSD, 4 TB HDD
Music at:
https://fogle622.wix.com/fogle622-audio-home