If you're playing local content, the PC is the better device.
That statement needs to be qualified. "For playing local content, the PC
can be setup to provide better picture quality."
By that I mean, you can load down a PC with video post-processing that will give subjectively better visuals compared to dedicated "set-top" players. By load down, I mean you would need a fairly beefy gfx card to do some of the more intense filtering that are popular with the "PC playback" crowd. It involves more than a bit of tinkering to get setup, as there are a lot of potential "knobs to turn" when setting up a dedicated PC playback setup.
From an end-user interface experience, the set top box is easily the better experience. And as said, for internet streaming the set top box will win across the board because, quite frankly, most internet streaming companies don't want people using their PCs for playback, and so they nerf the quality of the streams available for PC playback. For local playback, a PC can be setup to provide a better image, but it is not automatic, and it is not a foregone conclusion that the effort would be worth it, but that is something you would have to investigate for yourself as everyone's priorities are different.
Personally, I used to use a dedicated media PC for direct playback many years ago. I've switched over to set top boxes long ago. I periodically look into the claims of PC playback advantages (reviewing and playing with MadVR filtering most recently) and for "overall enjoyment" I have no desire to move back to a PC as the playback device. I use a Nvidia Shield for internet streaming, and a Zidoo Z9X for local playback. They are not without faults, but the potential for slightly better video quality playback by going back to using a PC as the direct playback device is not worth the hassle for me.