I'm trying to set a custom field featured_image with ACF and can't access it within my php code. First are screenshots of confirming adding the field to the latest post, then after is the php code.
I'm very new to WordPress so I'm expecting this to be a trivial misunderstanding.
I've run var_dump( get_post_meta(get_the_ID()) ); which doesn't show the existence of the 'featured_image' field. I've also created a text custom field, which also doesn't show up.
<?php $my_query = new WP_Query( 'cat=2&posts_per_page=3' );
while ( $my_query->have_posts() ) : $my_query->the_post();
// some variable code
?>
<div class="section-info background3">
<div class="section-details">
// some irrelevant html
<?php
$image = get_field('featured_image');
var_dump( $image );
echo $image;
$featured_image = the_field('featured_image');
var_dump( $featured_image );
$size = 'full'; // (thumbnail, medium, large, full or custom size)
if( $image ) {
echo wp_get_attachment_image( $image, $size );
}
?>
</div>
</div>
<?php endwhile; ?>
Which outputs
bool(false) for var_dump( $image );
NULL for var_dump( $featured_image );
Any help is greatly appreciated. Thanks in advance.

