It's going to take time to earn trust from peers and your manager to start getting more meatier work. If you're early career, I think 2 years is a good guideline. Many places hiring someone for their second job will expect you to be leaving your first job around 2-ish years. 2 years gives you the chance to take on larger projects and see the results of your work and get feedback about things you've pushed to production.
You probably shouldn't stay at your first job more than 3 or 4 years. The second job change is the hardest. It's when you realize that different companies do and value things differently. Staying too long at your first job will make it tougher to adjust. It's also good to get exposure to new ways of working while you're still agile enough to soak it up.
If you've left more than 2 or 3 jobs within 2 years it starts to look like a red flag.
For the first 10 years or so, this is relevant. After that you can figure out what you really want to do.
Early career pick learning and exposure to different technologies, processes, and company organizations.
That being said, this job market is pretty bad for the youngins so unless you are top 1% of noobs I would say focusing on stability and learning would be my north stars in the next 3 years.
One that is very important: Do you have another opportunity to accept? There is nothing better to get a job than being employed.
If you do have a offer, consider if you take; but if you don't, try to get one while you are employed and jump ship when it's a better one; repeat.