there are multiple ways to do this.
One would be to create a GAQL query to get the data you want, and then use this function to export the result to a Google sheet:
// this function sends the output of the GAQL query to a spreadsheet, takes GAQL query and sheet as input parameters
function gaqlToReportSheet(gaqlQuery, sheet) {
var report = AdsApp.report(gaqlQuery);
report.exportToSheet(sheet);
}
Another way would be to get your data via iterators and the stats object, store it in an array and then add the data from the array to a google sheet.
See my blogpost for instructions: