To create a pivot table in google sheets, select all data that should go into the pivot table, then select "data" in the top menu and "pivot table" in the drop down. Then you can create a new sheet or tab to populate the pivot table in. Then over in the right you can select what you want to see like you can see in the sample pivot table in the tab here named Pivot Table 1.
Link to the Google Sheet Template Pivot Table Sample & How To: https://docs.google.com/spreadsheets/d/1UgokEs6tJbdW6_ZH5eVw5hkZyMgvUqFvWDI_QtkNrs8/edit?usp=sharing
Sample data source: https://developers.google.com/sheets/api/samples/pivot-tables