It's not happened to me yet, my earning potential has only increased as I've gained more experience (41 now), especially since I went freelance.
I would say in your 20's is a great time to take risks. Usually doing this will give you great experience you can then apply throughout your life, too. For example:
- Work for a startup. Here you are on Hacker News! The pay won't be as good as a bigger company and equity probably won't ever pay out anything much, but you will learn a LOT if you choose to work for a half decent startup.
- Go freelance. This is how I've learned the majority of the technologies I've worked with. For the first 15 years of my career I mostly stuck to what I knew, after going freelance my skillset grew significantly due to working with various different clients with different requirements. Note that if you go freelance it will be hard to go back to working in permanent positions. The freedom and money is really nice.
Starting a business - (Assuming you mean "build a product") - I personally wouldn't recommend this unless you have a good idea; early paying customers; the ability to commit to it and execute continuously. It's the most difficult career path to take. IMHO it's worth waiting and gaining experience and seeing what else is out there first before diving in. It takes serious drive, tons of effort and some luck to be successful. I've released a few of my own products and nothing has been successful - becoming a successful freelancer was MUCH easier.
Take risks, meet people, learn plenty of new things. If you can combine your interests with your career it can be great but be careful you don't end up burning out on something you privately enjoy because of combining it with work.
Good luck!