Is the reputation/prestige of the scientific journals where you published a paper really important? Excuse me for the naive question, but is the reputation/prestige of the journal you chose for your publication really important?

In the end, I believe the scientific content of your paper must be the key part. Surely you want to publish it into a scientific journal which guarantees high visibility to your manuscript, possibly with Open Access and a strong social media presence. Surely you want your paper to go through an in-depth peer review, with honest comments and reviews. Surely you want fast processing times. Surely you want the journal to be about the paper topic. Surely you want a journal with the audience who are interested in the paper subject.

But in the end, is a specific paper P on scientific novelty N published on a journal J1 having impact factor 50 really more important/relevant/better than the same paper P about the same scientific novelty N published on a journal J2 having impact factor 5?

If yes, why?

Will it affect your career?
I can say for sure that the prestige of a journal can help you, particularly if you are a young academic!

I was applying for a position at a university several years ago and ended up being the second-choice candidate. Even though my publication record was larger than the other candidate's, and I had been publishing in good journals such as Journal of Physical Chemistry, Journal of Chemical Physics and Physical Review—all of them highly reputable journals in their individual fields, I lost out to someone who had published several papers in Nature. (I learned this after the fact from one of the members of the search committee.)

So, yes, publishing in good journals is very important when you're starting out.