Depends what you want to do with it. If you plan on doing any transcoding in Plex, you can probably build something cheaper than you can buy a prebuilt server. If you just want to direct-stream and other low-impact stuff, a prebuilt one would be easier.
I built a FreeNAS box running Plex, hosting a Minecraft server, providing network storage, and a few other things. Learning curve was steep but it's great now.
I would agree with most of what has been said here. The simple answer is that it depends. Do you want/ need to transcode files? Do you have a system running around the house that could do the job? How much do you want to tinker with hit? These are all questions that you need to answer.
So my personal path for Plex the past decade or so was dual drive windows software raid 1 -> drobo 5 bay dual disk redundancy -> qnap 1635ax in raid 6 -> antec twelve hundred v3 tower using all 12 bays for hdd enclosures running unraid.
So the biggest question is how comfortable are you building your own computer/nas and maintaining it?
A prebuilt nas will be substantially easier to use and setup, however you're going to pay about 2x as much in cost and you will get about 1/3 of the capability.
I'm a bit proponent of unraid for running Plex storage as well as the server itself in a VM/docker container (or freenas).
You get essentially unlimited hard drive expansion capabilities (limited only by the amount of slots in the case you have which is normally 25-30 HDD at the very most ~ my case build will max out with 20 drives).
My entire system, which comprises of a 10c/20t xeon cpu, supermicro mobo, 128gb DDR4 ram, and case cost about $600 (excluding hard drives), to compare, the qnap 12+4 bay nas was $1250 and was an arm quad core CPU with 4gb of ram.
Don't get me wrong the QNAP worked great serving up the storage and extremely easy to setup/use, but it was extremely non-performant in comparison to my current system and at a higher price point.
If you have any linux knowledge whatsoever I highly recommend building your own nas system instead of buying a prebuilt, if on the lower end it may be cheaper to get a prebuilt, but in terms of performance per dollar self built is going to win out pretty much every time, on the medium to high end its going to be a no-brainer as it will be cheaper and faster.