A great place to start would be the NK 6.0 Build Guide
LGA 1151 (8th / 9th gen) is currently the sweet spot in terms of price / performance; at least if you are buying used and located in the US.
For a CPU I would probably go with an i3 (8100, 8300, 9100, 9300) Those are the least expensive for the socket, but they still offer plenty of performance for most home server NAS use cases, will trancode for Plex / Jellyfin just as well as the more expensive CPUs on the socket, and even have ECC support depending on the motherboard.
If you need a little more performance and don’t care about ECC you can go with an i5 for only slightly more cost.
Finally if you want lots more performance and ECC you support you can check out the more expensive Coffee Lake Xeons and C246 chipset motherboards.
You will want to dedicate a drive to parity; So to get to 20GB of storage you could get 2x 20TB drives which maximizes your future expansion, but 20 TB drives are expensive. You might be better off with 3x 10TB drives instead.
For OS I highly recommend Unraid. Unraid has unfortunately switched to a subscription model which is a bit of a turn-off, but it is still worth it IMHO. They do have an expensive tier with unlimited updates which you could potentially upgrade to if / when it goes on sale.
Good luck and let us know how it goes.