Here's a link with a few methods [ mostly pretty easy ] of figuring out the frame size you want to get , based on the size of your body, it accounts for different styles of bicycles as well. ---
https://www.bicycle-guider.com/bike-articles/bike-size-chart/ --- We used it recently when our family went shopping for used bicycles we saw on craigslist, or were in stock at the local bicycle shops - before we made the trip to see and ride the bicycle, it made sense to know if the bicycles overall size was in the realm of what we needed...
If you comb thru your local craigslist or similar site, you'll find some ads that are more detailed than others and will list the frame size.
No sense going to see a bike that you cannot step over the top horizontal tube, or the opposite -are scrunched up riding it ' cause its too small.
We ended up buying 2 used mountain bikes -a late 90's era, and a 2000's era, from a local bike shop. We test rode them first. Everything was in good working order - shifting / brakes / tires / good but not perfect paint. They came with a 1 yr warranty , and included 1 future tune-up. One has brand new tires. They sold lots of higher end new bikes as well, but took in nice units as trade-ins which they would go thru and sell used . They are "good mid level, when originally sold" bike, probably approx $500 each +/- when new. We paid $220+$180.
The other we bought off a craigslist guy who is a hobbyist. He had a few bikes listed, all which looked to be in nice shape, with a good description, and decent pricing. His happened to be more of a hybrid mountain / cruiser , which was better for the intended usage [ more pavement, but capable on some packed gravel trails ] . Better for my wife. Only 7 speeds. 1 shifter mechanism . Which is what she wanted. A couple small scratches but otherwise presents and rides as new. Paid $160 , it's a 2011 model that sold for about $400 new.
- edit to add. I saw you mentioned growing up with a cheap mtn bike. I think you'll much prefer spending <$400 on a nicely built, with good components - a lighter used bike, whether mtn / hybrid/ cruiser/ road bike/ or whatever. --- A new $200 K-mart mountain bike has the cheapest parts. The box store retailers know cheap bikes likely will go less than 75 miles from store shelf to scrapheap. The only "name brand" component i can find on my former $200 cheaply built ride, is a derailer by Shimano [ only 1 out of the 2 on the rig ! , + probably the cheapest type of the many styles they make, that they're willing to sell in bulk]