I got into mtn biking almost a year ago and had the same question then. Here’s what I did:
1. 2018 Marin Hawk Hill 2. Got it new in Nov 2018 for $1850. But soon I realized my climbing sucked. Even though I kept riding to increase my stamina and improve my climbing, it felt like nothing was helping. I sold it a couple months ago.
2. 2019 Santa Cruz 5010 CR+: I bought new it in March 2019 for $3999. I love it. Took it to trails with longer singletrack decents. Helped a bit with climbing. So I replaced the chainring from 32T to 30T. This helped me with climbing.
3. 2019 Trek Stache 5: bought it new in Aug 2019 for $1499. I was looking for a bike that can help with longer, non techy climbs on fire trails. There are several places near by that offer that. Also, I was looking for one that helps eat up rocks. The 5010 certainly did that, but I thought a 29er would also help more with climbing. This Trek has been my go-to bike. But it’s not ideal for techy climbs/decents like tight switchbacks. I’d use my 5010 on these types of trails.
Hope this helps.