I knew what bcworkz said about it not working with the block editor galleries (I’ve had problems with this function before), so now Im just confused as to why it worked when I used it in v 5.1.6.
Anyway, with a combination of the two answers I threw together this which seems to work fine. The theme I’m developing is for myself, so I know I can always guarantee that the first gallery will the be one I need (and I know it will always be there), which is why I was fine hardcoding it.
$postBlocks = parse_blocks($post->post_content);
$firstGalleryIds = $postBlocks[0]["attrs"]["ids"];
$previewImages = [];
foreach ( $firstGalleryIds as $imgSource ) {
$previewImages[] = wp_get_attachment_image_src( $imgSource, $size = 'large' )[0];
}