Here is some info about this. ISWC codes are created when you register your tracks with your PRO. That has nothing to do with distributing on Spotify, etc.
A lot of composers upload their non exclusive tracks to those platforms in order to make some extra money from streaming. I don’t do it, but some claim it is worth it.
You can purchase the ability to make your own ISRC codes at USISRC.org which I do recommend doing. ISRC codes matter for collecting royalties through Soundexchange. When CDBaby (or whatever) assigns ISRCs to your tracks, it is with their code. If you have your own code, it shows that you truly own the music.