Need help buying/upgrading desktop for UE4

So I’m trying to buy a decent desktop PC to run UE4 for some basic messing around; nothing too major. I’d like to spend no more than $900 for everything, but I’m afraid if I go the build-your-own route, then I’ll max that out and not have enough for a monitor/keyboard/OS etc. I’m wondering if it’s feasible to buy a bundled computer and just replace anything that needs upgraded. I really know very little about the hardware or where to start looking, but Walmart (the only place in town with computers) has some fairly inexpensive all-in-one PCs. There’s the HP Pavilion 22-a113w for only $450, but it only comes with 4GB RAM so I’d have to up it to 8 or preferably 16GB. The CPU is an Intel Pentium G3260T with 2.9GHz but only 2 cores when I think I need 4? I’d also need a good graphics card, but I’d have at most $450 leftover for those (but the less I spend the better of course). There’s also the Pavilion 570-p013wb for $550, with 8GB RAM and a better intel core i3-7100 CPU, but unlike the first it doesn’t have a touchscreen monitor which I’d really like to have if possible. I don’t know about the motherboard or PSU for either (or how important those are), but I don’t want to drop ~$500 only to need to replace everything. Is any of this doable? I know it’s a lot but if anyone with experience can help out or point me in the right direction, it would be incredibly appreciated.

Thanks ^v^

Pavilion 22-a113w: -22-a113w-All-in-One-Desktop-PC-with-Intel-Pentium-G3260T-Processor-4GB-Memory-21-5-touch-screen-1TB-Hard-Drive-and-Windows-10-Home/46429960

Pavilion 570-p013wb: