How do I get a list of all CSS and JS that are attached to a page?
You cannot get a list of css/js files because it is constructed very late in the render process.

However, since you want to use an iframe to achieve that goal, you can get it through the normal loading order of a drupal page.

The following is a proof of concept controller method you can use to display a block in a simplified html mode.

public function preview($block_id) {
  /** @var BlockInterface $block */
  $block = Block::load($block_id);

  /** @var BareHtmlPageRendererInterface $bare_html_page_renderer */
  $bare_html_page_renderer = \Drupal::service('bare_html_page_renderer');
  $content = [
    'preview-child' =&gt; \Drupal::entityTypeManager()-&gt;getViewBuilder('block')-&gt;view($block)
  ];

  return $bare_html_page_renderer-&gt;renderBarePage($content, 'preview-title', 'preview-theme');
}