I'm no expert, so don't put too much stock in this, but a few tips from my experience:
1. Don't set out to start a business, then look for an idea. Instead, look for opportunities while you gain experience in a particular industry. I had 14 years of experience in the research/grant world before co-founding my first private business.
2. (Maybe) Look for a job as an SWE or IT support person within a non-IT company. Do a great job serving others and you'll become the go-to person for solutions. By the time I started the first company, we had already built over 10 small databases to solve specific problems, but none turned into anything more than one-off solutions to streamline specific processes.
3. Work hard, persevere, have a positive attitude, and always look for ways to help and serve everyone around you. Software is just the tool to provide a service. We support our clients through the software we build, but also through a very in-depth understanding of their world and how we can best help them. You also need a support network to start and grow a business, and people are much more likely to help and support you if they value and respect you.
4. Maybe owning your own business should be a 10 or 15 year goal. I know that's probably hard for people early in their careers seeing so many others self-employed. But there's something to spending a decade learning an industry and building a network. I'm not sure either company would have been successful had I started them in my early 20s. Just because the unicorn tech companies we hear about were founded by young college drop-outs doesn't mean that's the norm.I read somewhere that the average age of small business founders is somewhere in the 40s.
That was just my path, so take it with a grain of salt. There are many paths to starting a business and you'll want to decide what you want to get out of it. For me, it was never about making lots of money. It was about building something that helps others, creating good careers for people, and having the freedom to make our own decisions.