The Pi is just a relatively small, cheap computer that you can use as a source. When combined with software from one of several free software projects it can be used for streaming music from local storage (USB, microSD), local network (NAS or network share from PC) or from various internet sources. The details vary, partly depending on which software you pick, and partly whether you decide to attach a display to the Pi. You can use it with a USB DAC, or one of the various 'hat' DACs or coax/toslink digital outputs that are built to attach directly to the Pi. There are a lot of options - this can be a blessing (you can probably make something that does exactly what you want, but may need to put in some time and effort) or a curse (just too confusing, don't know where to start!). Most of the software options have installation guides to get you up and running relatively easily.
piCorePlayer uses LogitechMediaServer (LMS) which has plugins to stream from YouTube and SoundCloud among others. I haven't used either of those plugins myself, but the other plugins I have used work well. I don't know which of the other software options support those, but you should be able to find out on their web sites. The other usual options are
Volumio,
moOde or
Rune but there are more. I would suggest trying more than one to see which suits you best. You can control them using a phone or tablet, either using an app or a web browser for the GUI. There are other options like adding the Pi 7" touchscreen, or connecting the HDMI output to your TV and using an infrared remote.
As a bare minimum you need a Pi, a microSD card and a power supply, although a case of some sort is highly recommended! Which Pi doesn't matter too much - most of the software options are even capable of running on a Pi Zero W, although perhaps with reduced capabilities - but a 2GB Pi 4 is probably a good starting point. You don't need to worry about heatsinks - audio isn't a demanding load and it will run fine without. There are starter kits that include the Pi, psu, case and microSD card. You will also need a computer (PC or Mac) to download the software and write it to the microSD.