You can use the table theme type to do this. In your build section, return a render array that includes this:
return [
'#type' => 'table',
'#header' => $header,
'#rows' => $rows,
];
Where header is an array of strings and rows is an array of row value arrays.
Some reference items I found:
New render element #type 'table'