You can use SUMIF in Google Sheets to add numbers together that are associated with a date range, specific text, or meet a numeric criterion.
The text above is a summary, you can read full article here.