Hi, welcome to AS! Willkommen!
If you are in search for help, try to provide useful information for the folks who would like to help you.
Like: which type of RPi, which type of PC system?
Without this:
Yes – with your RPI4 you could usethe OTG function to use th RPI as usb device.
My choice: dacberry pro
My choice: Raspian/Raspberry OS
If you are going to invest money, buy an external dac, and don’t mingle with an extra device if you do not need to.
Otoh, you can connect your PC to your Pi through ethernet or wifi using Airplay DLNA or UPNP – you’ll find a couple of software like moode, volumio etc.
I haven’t tried the Pi as usb device personally, but sources like this:
https://forums.raspberrypi.com/viewtopic.php?t=270653
Informationen about that.