How to understand if it's the moment to become a team leader? I am finishing my first postdoc in computer science, and I have to make a decision about what I want to do next.
I have basically two options:


Try to get a new position as a senior postdoc or junior researcher. In this case, I will have limited scientific freedom, and there will be a principal investigator supervising my work. This means having to adapt myself to the scientific strategy of the research group, but also not having big responsibilities, and having the possibility to learn a lot (and get help) from the principal investigator.
Try to get a new position as a team leader or junior principal investigator. In this case, I will have a lot of scientific freedom, and I will be able to decide the scientific strategy of my research group. But I will also have more responsibilities (that is, I'll be fully responsible of my group mistakes), and I won't have anyone directly from which to learn new stuff, or to help me.


My long-time goal is to become a team leader for sure, but I just don't know if now is the right time for the "jump".

How to make the right decision? How to understand what I would prefer most?
How can I understand if I'm ready 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. ;)