In order from smooth trails to Red Bull Rampage back flip drops you have:
Cross country Bikes, Trail bikes (all-mountain), Enduro bikes (also sometimes considered all-mountain), Downhill bikes
A XC bike will generally have less suspension travel and will go faster and climb better than a trail bike. A trail bike will have more suspension and a slacker head tube angle to make it easier to keep the weight rearward and to roll steep stuff without doing an endo. There will also be bikes that blur the lines between those categories, XC but with more travel... Trail but with faster geometry, etc... I'm old enough to enjoy the extra travel of a trail bike so my back doesn't feel all of it the next day, but that comes at the expense of speed. Either a XC bike or a trail bike will do you fine for the trails you mentioned. The trail bike will get you up and over chunkier stuff a little easier than a XC bike. But the best rider I know is a 19 year old kid down the street who regularly rides repeats up the Hill of Life on the BCG gets up it clean every time on a XC bike. Check the bike manufactures websites and see which bikes in their line are XC and which are Trail so you know which bikes compare to which across different brands. They will all have differences in geometry and the numbers might mean something to you but if you're like me you just need to test ride them to know what feels right.
Ignore the Enduro and DH bikes... But if you ignore that advice I have a sweet deal on a Pivot 5.5 trail/enduro rig.
And it's a bad time to be buying bikes. Manufacturers got way behind during COVID shutdowns and new bikes at shops are often back ordered by months. That has driven up the prices on the used market.