On Windows, there is a Secure Audio Path API to prevent interception of the audio signal.
this would mean no, you’re not good.
and you need to take their second bit of advice to heart! always shoot for higher bitrate files if you’re learning to produce. manipulating lossy files will often sound nastier, so get FLACs/WAVs of the songs instead. with those two reasons + the fact that Spotify could possibly have unnoticeable watermarks while streaming even if it does work, I would strongly advise against getting your samples this way
Recording Spotify to your DAW, can this get your account banned?
Does Spotify have a way to see if your computer is recording with your DAC’s stereo mix? And if so, is there a way around it?