What do your local trails look like? Fairly flat and flowy with a little bit of tech or more janky and downhill?
If flatter, I'd say go for a hardtail 27.5+ bike. Will be a bit rougher that a full suspension but the high volume tires will dampen a lot of the trail. It will will also be the most economical option.
If the trails are rough and aggressive, go for a full suspension. The travel the bike has will depend on what kind of trails you ride. These bikes will be more expensive but may be necessary in your location.
If buying used:
Be sure the bike is legit. A lot of shitty people will try to sell you a cracked frame or a bike with a seized fork. Just be aware.
Things to avoid:
26 inch wheels. Unless you're buying a dirt jumper don't go for a 26 inch wheeled bike. The industry has long gone past this former standard and they are fully outclassed by a 27.5 inch or 29 inch wheel.
If you can, go for a 1x drivetrain. Not only does it look cleaner, it's also more mechanically simple.
Hopefully this helps and good luck