Group By (Home or Transform tab) collapses rows that share a value into one row each, with aggregates such as Count Rows or Sum. Grouping twelve web orders by Store gives one row per store, with its order count and sales.
Basic groups by one column with one aggregate. Advanced adds more grouping columns and more aggregates: Store and Channel, with both Orders and Sales.
Group in Power Query when the model only needs the summary, because fewer rows load faster. But the detail is gone. A slicer on Channel can't filter a table that was grouped by Store alone, and nobody can drill into orders that were summed away. When the report needs to slice the numbers, load the detail and write a DAX measure instead.
= Table.Group(Source, {"Store"}, {{"Orders", each Table.RowCount(_), Int64.Type},
{"Sales", each List.Sum([Amount]), type nullable number}})
Group By with two aggregates.