I would recommend working for a restaurant first so that you are knowledgeable and know what is required to run a successful business. With the knowledge you learn from that, you would be able to open a much more successful restaurant. Having some experience is better than diving into a difficult job unprepared.
It depends on what you wish to do; if your end goal is being a restaurant entrepreneur, opening your own restaurant is a quicker path but you need to have financing to do so in the first place...and unless you're already rich, this requires credibility which is best obtained by having experience in the restaurant industry by working your way up, of which one way is starting out being a line chef.
In order to become an amazing head chef, you will need to learn from the best, although it might be tempting to strike out on your own as soon as possible & also aspiring to be executive / head chefs - It is imperative to know the skills of producing high-quality food - taste wise and displaying creativity and advanced culinary techniques and keeping up to date with the latest culinary trends as lastly you should have skills to manage people, make them feel appreciated and valued for the job they do, and most importantly prove through your actions... :)