I suspect it might take a few years to perfect your writing chops. Seems like literary prodigies are rarer than musical or math ones, for instance. Of course, people vary in the rate at which they improve. A lot depends on the amount of reading and writing one does as well as basic talent for picking these things up quickly.
Another issue might be life experience and knowledge. Older folks have a certain amount of perspective about people (since they've possibly already been several people in their lives) and of course know more about how the world works and about how people respond to different things. This might allow them to portray a wider variety of people and emotions realistically.
But there are always exceptions, and it probably depends on one's target audience too. Someone in their earlier 20s might be closer to the target demographic for contemporary YA fiction. A lot has changed since I was in high school in the 80s, and it's not just technology, but attitudes. I teach at a college, but it's still hard to keep up with all the trends and changes in how people think
There are plenty of people who published their first stories, even their first books in their 20s, though. Then there are people like me who always liked to write when they were younger but was too consumed by school, grad school, relationships, career stuff etc. to do it more than as sporadic hobby, and who was intimidated by the whole concept of publishing anything until fairly recently. I'm riding the other end of the bell curve here, and recently got that sinking feeling, because someone mentioned things that writers do that "give away" to publishers that they're older.
I don't actually do any of those things (like leave 2 spaces after a sentences), but the underlying message was that being older is something you must hide if you want to get published. No idea why. It's not like my ability to have babies is relevant here, and it's my characters who would be dolled up and put on promotional posters in skimpy clothes, not me.