How to understand if it's the moment to become a team leader?
As someone has noted, much of this is down to your personal preference, but there are a few notes I would make on your question, your thinking behind it, and what it entails:

Postdoc

Your characterization of a postdoc isn't necessarily accurate - especially the parts about scientific freedom and adapting yourself to the scientific strategy of the lab. In my lab, I deliberately recruit postdocs with strengths that are not my own, and rely on their expertise to help guide strategy. Similarly, when I was a postdoc, my interests in several different approaches to a problem were something the lab indulged, even if they were decently far afield from their "mainline" work.

Junior PI/Team Leader

It's not clear here what you mean by "Junior PI" - if you merely mean that you'll be new, and not senior faculty. But when it comes down to it, you're a PI, or you're not (and note depending on the project you might not be - for example, I have some full professors who are on a project with me who are adapting themselves to my scientific strategy, because in this case I'm the PI).

But the advice I give my students and postdocs is this: You should be ready to tell your own story. Not an extension or adaptation of mine. You're ready when you can string together what you've done into a coherent whole, and be able to point to a spot on the scientific horizon supported by that story and say "I'm going to head that way." But it needs to be past "I used X method", "Y question was asked and here's the answer...", etc.

Note, some people don't care to get there, and live long, fruitful, and scientifically interesting lives.

And the flippant, slightly bitter answer: When you're tired of doing research and want to spend your time in meetings and answering email. ;)