If it's the latter, what led to it?
It also seems like we can point out fewer 'great' well-known individual scientists from the latter half of the 20th Century. Is this related? Or is it just a perception issue again?
Science did become more team-based over the 20th century, in part because its size and scope increased dramatically (at the extremes, this became known as "Big Science," but even mundane, non-big science takes place in labs with teams of researchers these days). Some of these trends however are a matter of public knowledge rather than some kind of underlying shift in how it was done. For example, one knows the name of several "great" individual scientists but their assistants, technicians, and so on have typically been written out of the story because we have an obsession with "great" individuals.
Similarly one needs to be careful about making suppositions between the scientists who are "great" and the ones who are well-known. My favorite example of this is John Bardeen, who practically nobody has heard of, but he's the only person who has ever received two Nobel Prizes in Physics (for the transistor and superconductivity). The reason you haven't heard of him is because he's boring and doesn't have any kooky anecdotes. His co-Nobelist on the transistor, William Shockley, is much better known — because he was a jerk in about a million different ways, which leads to stories.
But I do think that in general one can say, in the 20th century, as the scientific enterprise grew dramatically (esp. in the second half of it), and the "low-hanging fruit" got picked up, the ability of any one person to contribute in huge, seminal, field-changing ways decreased. There are a few people who still pulled it off, to be sure. But it gets harder to stand out from the crowd when the crowd gets both larger, better funded, and has already made a lot of good progress. The "revolutions" have been much fewer and far between as the 20th century finished up, as well — perhaps, again, because of the "low-hanging fruit" issue, but also because in some fields there entered in somewhat hard barriers on making future progress (e.g., in high-energy physics you need increasingly large particle accelerators to do the work, and in theoretical physics there are some problems that do not seem amenable to testing at all).
So as with all things the answer is "a little of both." There certainly were changes in the 20th century. This does not mean that the pre-20th century perception of science is accurate, though.
To add to what u/restricteddata already wrote, there have also been real changes in authorship practice, beyond those resulting from researchers working in larger groups. While "publish or perish" isn't literally true, the number of publications is very important career-wise, in terms of finding jobs in a tough job market, in obtaining research grants, in promotions, and even in keeping jobs. Publications are very simple beans for bean-counters to count, and thus they are widely counted. Using the number of publications as a metric has resulted in strong motivation for individual researchers to improve their performance as measured by that metric. One method is simply to do more research, and have more research results to publish. This isn't the most efficient method.
One response has been to make researchers much more protective of their authorship rights, and to expect authorship for smaller contributions than before (note that authorship on a scientific publication indicates contribution to the research, not contribution to actually writing the paper). There have been many papers in the past that were published as single-author papers but would be multi-author papers if published today, with students, supervisors, helpful colleagues, research assistants, etc. being listed as authors on a modern version.
This publication pressure has also resulted in dubious authorship practices, with heads of labs/institutes/etc. being given authorship despite no scientific contribution to the work (some publishers explicitly state that being the head of the lab/institute, or providing the money, or the lab space, or similar, is not enough - there needs to be a real scientific contribution to warrant authorship), honourary authorship, authorship trading (two researchers listing each other as co-authors despite no contributions). It has also increased the motivations for plagiarism and data fabrication and other forms of academic/scientific misconduct.
Significant growth in the number of authors per publication started in the 1960s and 1970s, and the number continues to grow - for this figure, and more, see Dunaiski, Marcel, Analysing ranking algorithms and publication trends on scholarly citation networks, MSc thesis, University of Stellenbosch (2014), https://www.researchgate.net/publication/309209292_Analysing_ranking_algorithms_and_publication_trends_on_scholarly_citation_networks
There are two further points about average number of authors per paper. First, when looking at changes in authorship, the average (i.e., arithmetic mean) number of authors isn't always the best metric. The mean authors per paper in nuclear and particle physics hit about 50 earlier this decade, but the median number of authors per paper is a more modest 3. A small number of "hyper-authored" papers can pull the mean author numbers up a lot! See https://www.natureindex.com/news-blog/paper-authorship-goes-hyper for discussion and statistics.
Second, one can "correct" for this, by counting shared authorship fractionally. That is, if a paper has 3 authors, to count it as 1/3 of a paper for each author. Doing this, one finds that fractional authorship has stayed essentially constant since 1900, as found by Fanelli D, Larivière V, (2016), "Researchers’ Individual Publication Rate Has Not Increased in a Century", PLOS ONE 11(3): e0149504, https://doi.org/10.1371/journal.pone.0149504
It also seems like we can point out fewer 'great' well-known individual scientists from the latter half of the 20th Century. Is this related? Or is it just a perception issue again?
Around the start of the 20th century, physics was the king of sciences, and the well-known breakthroughs were in physics, and the superhero scientists were physicists. Even some of the well-known winners of Nobel Prizes in chemistry were physicists or physicist-chemists (e.g., Rutherford and Curie). This was the time when the special and general theories of relativity were developed by Einstein and others, thermodynamics took shape (Nobel Prize to Wien, which would likely have been shared by Boltzmann and Stefan were they still alive at the time), the basics of atomic structure uncovered (multiple Nobel Prizes), and quantum mechanics developed (many Nobel Prizes). Much of the science they developed is taught in schools and introductory courses in universities, and many of the key scientists who contributed are known through the simplified histories taught in such courses. Einstein's fame was/is such that he is known as a celebrity through popular culture as much as he is known through science textbook science history.
In the latter half of the twentieth century, there was a strong shift of physics to condensed matter physics (where the centre of physics still sits), and much of the progress was in applied physics rather than the kind of fundamental theory for which the history sits in neat little stories in science textbooks and coffee table science books. Thus, the scientists are less well-known that those from the first half of the century. Where they are known, they are often known other than through science textbooks: Feynman is known for his popular writing, Hawking for his pop science book, his disability, and movies/TV, Steven Chu for being US Energy Secretary.
The growth of science as a collective enterprise and a growing isn't closely reflected in Nobel Prizes. The Nobel Prizes are limited to a maximum of three awardees for each prize, which has capped the number of laureates per year. Still, the difference in average number between the first and second halves of the 20th century is clear. Many of the shared awards have gone to researchers who worked independently of the other awardees - these reflect growth in science rather than increased collaboration. The winners of the Nobel Prizes today are often the tips of their icebergs - lead researchers in large collaborative research groups. Without their colleagues, their postdocs, their students, their work would not have reached the quality or quantity, or had the impact, that is recognised by the Nobel Prizes (there are exceptions: Donna Strickland's 2018 Nobel Prize in physics was for her PhD work, shared with her supervisor).