Well, by definition indices should be less risky than individual stocks because they are diversified (i.e. holding a basket of stocks), however, dig deeper in the index you are looking at and you will find wonders.
For example, the S&P500 top 5 holdings are Apple, Microsoft, Amazon, Facebook & Tesla. I don't have the weights of the those top 5 (It's not published and it's a pain to manually calculate).
However, the point is that, those top 5 constituents weights combined will be around 20% (Ballpark).
It's clearly a skew, since what happens with those 5 companies greatly affect the index, hence, it's not as diversified as it should be.
Another point, the Technology sector weight in the S&P500 is around 27% and Healthcare is around 13.5%. So 2 sectors only are 40% of the index, it's again a skewed exposure (At this point in time because the weights do change).