How do I add edit/delete buttons to a custom module items list?
You can try code:

use Drupal\Core\Link;

[...]

// Create the row element.
$rows = array();
foreach ($result as $row =&gt; $content) {
  $rows[] = array('data' =&gt; array($content-&gt;requestid);
  $rows[] = array('data' =&gt; array($content-&gt;name);
  $rows[] = array('data' =&gt; array($content-&gt;contact);
  $rows[] = array('data' =&gt; array($content-&gt;reqtext);
  //Actions.
  $edit_link = Link::createFromRoute($this-&gt;t('Edit'), 'myrouter.edit_form'['id'=&gt;$content-&gt;requestid], [
        'absolute' =&gt;
          TRUE
      ]);

$delete_link = Link::createFromRoute($this-&gt;t('Delete'),'myrouter.delete_form',['id'=&gt;$content-&gt;requestid], ['absolute' =&gt; TRUE]);


$build_link_action = [
      'action_edit' =&gt; [
      '#type' =&gt; 'html_tag',
      '#value' =&gt; $edit_link-&gt;toString(),
      '#tag' =&gt; 'div',
      '#attributes'=&gt;['class'=&gt;['action-edit']]
     ],
     'action_delete' =&gt; [
       '#type' =&gt; 'html_tag',
       '#value' =&gt; $delete_link-&gt;toString(),
       '#tag' =&gt; 'div',
       '#attributes'=&gt;['class'=&gt;['action-edit']]
       ]
      ];


 $rows[] = ['data' =&gt; \Drupal::service('renderer')-&gt;render($build_link_action)];
}

// Create the header.
$headers = array('requestid', 'name', 'contact', 'reqtext','options');


$output['results_table'] = [
  '#theme' =&gt; 'table',
  '#rows' =&gt; $rows,
  '#header' =&gt; $headers,
  '#empty' =&gt; $this-&gt;t('There are no items to display.')
];
return $output