There are advantages to being self-employed but it's nowhere near as advantageous as running a business capable of earning money while you sleep.
It seems that most people who claim to own their own businesses actually own their own jobs. Freelancing is a clear example: your income is dependent on how much time you're able to spend working. That's not a lever you want to pull.
The moment you hire someone to do your job for you, you have a business. You've built an asset capable of generating income without you. There will be necessary optimization and maintenance, but you're free to work on the business instead of in the business.
Working on the business unlocks compound growth. Hours are sold when you're working in a business but hours are invested when you're working on a business. Picking fruit for a farmer is a job, planting your own seeds is a business. Fruit must be picked daily but seeds will grow while you sleep.
Some jobs can be more business-like than others. The more shortcuts you can take advantage of, the more business-like your job is. There are no shortcuts in doing hard labor, but a computer repair specialist can write automated scripts to fix the most common problems his clients encounter.
Business-like jobs are limited to those able to leverage technology. Chances are your current job can be made easier by gaining a deeper understanding your existing tech stack.
Make your job as business-like as possible then use your newfound spare time to start a business.