Yep, creative commons allows others to use your work. Shazam work to tag music to people, so if somebody uses your song, Facebook and other platforms know somebody else owns it. It makes mistakes, but when you use distrokid, songtradr and others, they protect your music and keep track of it - for a price, of course. Other companies exist in most countries who register music against people - here in the UK we have PRS, who work for the composers and writers and PPL, who look after recording rights. I make little money from them, but if you enter a song title, it knows who wrote it, who performed it, and broadcasters use them to pay what they owe, same as other big users of music. It also means that if you do arrangements of other people's music, you can get paid for that. I did a slow instrumental of a pice from the 60s/70s, and I got some money because the original artist used my recording as walk on music at the start of his live shows.
Seriously though - the time and effort in manually registering your rights is wasted - It was six years before I got my first PRS payment and it was only a few pounds.