This^^^
I've watched new bikes hit the market that I've drooled over only to ride them and think "meh". Gotta ride them and let the right bike pick you.
RIGHT!! Did this last year when I was really looking at bikes to purchase this year. Was dead set on the Pivot Trail 429. Normally I am between a medium and large size bike. Got to a demo day and they put me on an X-Large (even looking at their site said I should be a Large) and it fit just about perfectly. Everyone always talks about how awesome the DW Link suspensions are and that they are the baseline to compare all suspensions against. When I rode the bike on my normal, everyday trail loops (literally did my normal loops) I was completely underwhelmed by the bike, easily found its threshold for being overwhelmed by certain terrain and that was on their HIGH Dollar build with all XTR, Carbon everything and FOX everything build.
Turns out that the boutique company from Colorado (Guerrilla Gravity) was much more my style and ride I was looking for. And the build I wanted ended up coming in much MUCH cheaper. Anyways, take your time finding the right bike for ya. Most anything new will be upgradeable so if your budget is limited don't worry so much about the components.
For component spec, personally I would focus on the drivetrain and fork first, try and get something that is at least 10spd as you can easily upgrade that to 1x10. Forks are something that pretty much everything is tapered steerer these days and thru-axle. If it ends up being a QR axle for the front, see if the front wheels hub can be converted to thru-axle (this will save you some time and money down the road).
Like everyone says, buy the best bike you can for your MAXIMUM budget. This way you are not nickel and diming yourself down the road.