Joining a project with more senior people can be a benefit to your career. Assuming they are reputable there is little downside. You get to work with more experienced people, engage in research/technical conversations, get and share ideas.
If you publish with them, your papers are more likely to be read, based on their reputations. But, beyond that, you have an opportunity to greatly expand your circle of collaboration, potentially leading to other projects in the future. The experienced people already have a circle that you can be integrated into.
Eventually you want first and sole-author publications, but it isn't essential to start out that way, especially if people don't take notice or your work is lacking due to less experience and depth.
If they write grant proposals, get involved in that, just for the experience.
Some people are generous about authorship, letting you take the lead. One more paper is more important for you than for them. Yes, people may assume that the senior person had the ideas, but if they are good ideas then you get associated with them. The other assumption people will make is that this senior person sees something valuable in you. That vote of confidence can be helpful.
Treat your early career as a continuation of your learning experience and an opportunity to make and develop lots of contacts - especially with people who have a lot of ideas.