How do I create a summary that is grouped by years first and then months in Views using contextual filters?
In Views you can group results (e.g., by year), which can be found in the format settings. Within each group, the results are sorted according to your sorting criteria.

Although not exactly the same question, I think the answer of Views: how to ASC sort the grouping field #1 and sort DESC its content? is still applicable to your question.