^ Fit is king. It doesn't matter if you have a $500 or $5K bike, if it doesn't fit you well then you're just wasting your time and money. Starter bikes with decent components can start around your price range. But if you're knowledgeable and resourceful you can build your own mid/high end bike with the fraction of the cost of new one.
Spend some time doing research on different bikes, frames, components, etc. Then, pick a few you like and test ride them at a dealer. Test them on various degrees hills, turns, etc (riding around in a parking lot will not be enough to test the bike). After, get a proper fitting. (this will save you a lot of time and money in the future) Not every bike is meant for every rider. And finding one that fits you best will be a keeper.
Here is a link that helped me (no affiliation with the site)
Fit Calculator - Competitive Cyclist
Hope this helps.