$500 to $600 will get you a bare-bones “starter” MTB, but when shopping for a bike you certainly want to consider the amount and type of terrain you expect to be riding. It doesn’t make sense to purchase a higher-end bike when it likely would not be used as intended.

I would suggest to invest in a quality frame as, as mentioned, components can always be upgraded in the future.