you can do this pretty simply. I’m guessing you are inside the wordpress loop. Basically, get the link url, get the image url, echo out.
<?php
$custom_link = the_field('custom_url'); //probably want to check if this is empty
$post_thumb = get_the_post_thumbnail( $post_id );//you can pass size if you would like
echo '<a href="' . $custom_link . ' target="_blank"><img src="' . $post_thumb . '/></a>';
?>
https://developer.wordpress.org/reference/functions/get_the_post_thumbnail/