IMO, neither one really looks worthy of upgrades down the road, looks like both are QR instead of thru axle...geometry looks pretty old school as well.
It depends on the use case, but I think at this price point, used is a much better option, or a larger budget... Modern MTB frame specs include boost spacing, thru axles, 30.9 or 31.6mm seatposts(better for dropper posts,) etc. A lot of the budget MTBs lack some or all of these, and it doesn't make a lot of sense to upgrade these frames IMO.