I will definitely say that freelancing is the best way by which you can learn software development in your own terms and without having to depend on others.
A live project experience will help you get better job opportunities. Through freelancing you will not only develop your technical skills, you will also learn customer management. Expanding your technical knowledge and skills will make it easier to provide high-quality service to your customers.
Freelancing is a one-man show. You must develop not only your technical skills, but your management skills as well. Freelancing is probably the only profession that can trigger the entrepreneur in you.
So, want to be in charge of your destiny? That can only happen when you become your own boss.